/* ==========================================
   [GLOBAL] 全域重置與變數
   ========================================== */
* {
  margin: 0;
  padding: 0;
  list-style: none;
  box-sizing: border-box;
}

.main-content-area {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 30px;
  padding-right: 10px;
  box-sizing: border-box;
  margin-top: -10px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
}

html,
body {
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: rgb(243, 243, 243);
  overflow-x: hidden;
}

/* 當 checkbox 被勾選時（選單開啟狀態） */
#menu_control:checked~.mobile-menu {
  transform: translateX(0);
  visibility: visible;
}

#menu_control {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

body {
  background-color: rgb(243, 243, 243);
}

/* ==========================================
   [HEADER] 頂部列
   ========================================== */
/* 確保綠色條橫跨整個螢幕，不受 1280px 限制 */
.header-background {
  width: 100% !important;
  background-color: rgb(5, 71, 0);
  position: relative;
  left: 0;
}

.logo {
  position: relative;
  padding-left: 75px;
  min-height: 60px;
}

.main-logo {
  position: absolute;
  width: 60px;
  height: auto;
  left: 5px;
  top: 0px;
  z-index: 20;
}

/* 修正頁首內容置中 */
.header {
  width: 95% !important;
  /* 在小螢幕時保持邊距 */
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: flex;
  color: white;
}

#clock {
  font-style: italic;
  font-size: 12px;
  padding-left: 10px;
}

/* ==========================================
   [LAYOUT] 核心框架
   ========================================== */
/* 修正主內容區塊置中 */
.frame {
  width: 95% !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 20px !important;
  display: flex;
  position: relative;
}

.desktop-menu {
  width: 160px;
  display: block;
  flex-shrink: 0;
  background-color: #e0e0e0 !important;
  min-height: 100vh;
  position: relative !important;
  z-index: 9999 !important;
  /* 確保選單在最前 */
  pointer-events: auto !important;
}

.frame-right {
  flex: 1;
  padding: 0px 20px 20px 20px;
  min-width: 0;
  margin-left: 20px;
  position: relative !important;
  z-index: 1 !important;
}

/* ==========================================
   [SIDEBAR MENU] 選單樣式與保護
   ========================================== */
.item-title {
  background-color: rgb(5, 71, 0) !important;
  color: white !important;
  font-size: 20px;
  /* 稍微縮小，更精緻 */
  font-weight: bold;
  padding: 10px 0px 10px 20px !important;
  /* 縮減內顯，讓區塊變窄 */
  margin-top: 8px !important;
  /* 減少區塊間距 */
  margin-bottom: 8px !important;
  display: block !important;
}

.desktop-menu .item-title:first-child {
  margin-top: 0px !important;
}

.items {
  padding: 0px 0 0px 5px !important;
}

.items li {
  margin-bottom: 12px;
}

.items ul li {
  margin-bottom: 2px !important;
  /* 讓文字靠攏一點 */
}

.items a {
  text-decoration: none;
  color: black;
  font-size: 16px;
  /* 標準字體 */
  display: block;
  line-height: 0.5;
  /* 縮小行高，不讓選單拉太長 */
}

.item-bar {
  position: relative !important;
  z-index: 10000 !important;
}

.item-bar:hover {
  background-color: rgb(212, 212, 212);
  cursor: pointer;
}

/* ==========================================
   [GLOBAL] index.html 基礎骨架
   ========================================== */
#main_content {
  min-height: 100vh;
  background-color: transparent;
}

.menu a {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  padding: 10px 15px;
  cursor: pointer;
}

.item-bar:hover {
  background-color: rgba(134, 134, 134, 0.1);
}

/* 🌟 右側內容區的最強限寬，放在 main 確保所有頁面都不會暴衝 */
.frame-right {
  max-width: 1300px !important;
  flex: 1;
}

/* ==========================================
   領隊辭職
   ========================================== */

/* 1. 整個頁面置中並避開左選單 */
.main-wrapper {
  margin-left: 100px;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 100px 20px 20px 20px;
}

/* 2. 標題距離按鈕遠一點點 */
.header-text {
  text-align: center;
  margin-bottom: 40px;
}

.header-text h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

/* 3. 關鍵：讓按鈕左右排開的容器 */
.card-container {
  display: flex;
  /* 開啟左右並排 */
  gap: 30px;
  /* 兩個格子的間距 */
  flex-wrap: wrap;
  /* 萬一螢幕太窄，自動變上下排 */
  justify-content: center;
}

/* 4. 格子本體：固定寬大比例 */
.card {
  width: 350px;
  height: 250px;
  padding: 30px;
  border: 3px solid #333;
  border-radius: 20px;
  cursor: pointer;
  background: white;
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* 5. 滑鼠移上去變色 (簡單明瞭) */
.card.keep:hover {
  background: #f0fdf4;
  border-color: #22c55e;
}

.card.delete:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

/* ==========================================
   平板螢幕專用微調 (保留桌機雙欄排版，僅縮小字體避免擠壓)
   ========================================== */
@media screen and (min-width: 769px) and (max-width: 1180px) {
  .header-text h1 {
    font-size: 2rem !important;
  }

  .desktop-menu {
    margin-top: -10px;
    width: 120px !important;
  }

  .item-title {
    font-size: 15px !important;
    padding: 8px 0px 8px 10px !important;
  }

  .items a {
    font-size: 13px !important;
  }

  .main-content-area {
    margin-top: -20px;
    padding-left: 20px !important;
  }

  .frame-right {
    margin-left: 10px !important;
  }

  body {
    font-size: 14px !important;
  }
}


/* ==========================================
   [MOBILE] 手機適應
   ========================================== */
.buger {
  display: none;
  font-size: 40px;
  color: white;
  position: absolute;
  top: 10px;
  right: 20px;
}

.mobile-menu {
  position: fixed;
  top: 60;
  right: 0;
  left: auto;
  width: 160px;
  max-width: 80vw;
  height: 100vh;
  background: rgb(235, 235, 235);
  border-left: 1px solid rgb(211, 210, 210);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  visibility: hidden;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .desktop-menu {
    display: none;
  }

  .buger {
    display: block;
  }

  .mobile-menu .item-title {
    font-size: 16px !important;
    padding: 8px 0px 8px 15px !important;
  }

  .mobile-menu .items a {
    font-size: 14px !important;
  }

}