/* Reset & 基本樣式 */
* { box-sizing: border-box; margin:0; padding:0; }
body {
  font-family: Arial, sans-serif;
  background-color: #f0f2f5; /* 可自由更改背景色 */
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background-color: #4CAF50;
  color: white;
  position: relative;
}
.menu-btn, .login-btn {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px; /* 登入按鈕圓角 */
  border: none;
  background-color: #ffffff;
  color: #4CAF50;
  font-weight: bold;
  transition: background 0.3s;
}
.menu-btn:hover, .login-btn:hover {
  background-color: #e0e0e0;
}

/* 選單列 */
.side-menu {
  position: fixed;
  top: 0;
  left: -250px; /* 初始隱藏 */
  width: 250px;
  height: 100%;
  background-color: #333;
  color: white;
  padding-top: 60px;
  transition: left 0.3s ease;
  z-index: 1000;
}
.side-menu a {
  display: block;
  padding: 12px 20px;
  color: white;
  text-decoration: none;
  transition: background 0.2s;
}
.side-menu a:hover {
  background-color: #444;
}

/* 畫面遮罩 */
.overlay {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.4);
  display:none;
  z-index: 900;
}

/* 主內容畫面 */
main {
  padding: 20px;
  transition: filter 0.3s;
  min-height: calc(100vh - 60px);
}

/* 登入視窗 */
.login-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px 30px;
  border-radius: 12px; /* 登入視窗圓角 */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 1001;
  display: none;
  min-width: 300px;
}
.login-modal h2 {
  margin-bottom: 16px;
}
.login-modal input[type="text"], 
.login-modal input[type="password"] {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
}
.login-modal button {
  width: 100%;
  padding: 10px;
  border-radius: 8px; /* 登入按鈕圓角 */
  border: none;
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 8px;
}
.login-modal button:hover {
  background-color: #45a049;
}
.login-modal .close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 18px;
}
.login-modal .link-red {
  color: red;
  cursor: pointer;
  font-size: 14px;
  margin-right: 12px;
}

/* 響應式設計 */
@media screen and (max-width: 600px) {
  .side-menu { width: 200px; left: -200px; }
}
