.flex-column {
    display: flex;
    flex-direction: column;
}
.flex-row {
    display: flex;
    flex-direction: row;
}



/*@font-face {
    font-family: "Noto Sans TC";
    src: url("Noto_Sans_TC/NotoSansTC-Light.otf") format("truetype");
}*/
html{
    background-color: /*#fff*/#FAFAFA;

    color: /*#333*/ #222222;
    font-family: 'Noto Sans TC',"黑體-繁","微軟正黑體",sans-serif !important;
    overflow: hidden;
}
body{
    margin: 0;
    overflow-y: overlay;
}
body::-webkit-scrollbar{
    width: 16px;
}
body::-webkit-scrollbar-thumb{
    width: 16px;
    border-radius: 8px;
    border: 4px solid transparent;
    background-clip: content-box;
    background-color: hsl(0,0%,67%);

    transition: 0.5s;
}
body::-webkit-scrollbar-thumb:hover{
    background-color: rgb(140, 140, 140);
}

/*logo*/
#SLRLogo{
    /*position: fixed;*/
    height: 5vh;
    /*top: 2.5vh;*/
    /*left: 2.5vh;*/
    margin: 5vh 0;
}


/*header*/
header {
  
  top: 0;
  left: 0;
  width: 100vw;
  height: 15vh;  /* 你原本設定的高度 */
  z-index: 100;  /* 確保 header 在最上層 */
  
  display: flex;
  align-items: center;
  justify-content: center;
  
}


/*center*/
#center{
    width: 100vw;
    height: 85vh;
    border-radius: 10px;
}

/* main container 將頁面分為上下結構 */
#main-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 15vh); /* 預留 header 高度 */
  padding: 0 5vh;
  box-sizing: border-box;
  gap: 1rem;
}



#draw-container {
  /*position: fixed;*/
  top: 5vh;
  left: 5vh;
  width: calc(100vw - 10vh);
  /*height: calc(100vh - 10vh);*/

  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding-top: 0;
  /*flex-wrap: nowrap; /* 預設左右並排 */

  gap: 2.5vh;
}

.draw-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /*gap: 2.5rem;*/
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  width: 50vw;

  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 2.5vh;
}

/* 當畫面寬度小於某個閾值，例如 800px，改成上下排列 */
@media (max-width: 980px) {
  #draw-container {
    flex-direction: column;
    height: auto;  /* 讓高度隨內容撐開 */
    width: 100%;
  }
  
  .draw-panel {
    width: calc(100% - 5vh);/*90vw;  /* 寬度撐滿大部分畫面 */
    margin-bottom: 3vh; /* 底部間距 */
  }
}


.draw-panel h2 {
  font-size: 1.5rem;
  /*margin-bottom: 2vh;*/
  margin: 0 0 2.5vh 0;
  font-weight: bold;
}

.draw-blocks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5vh;
  margin-bottom: 2.5vh;
}

.color-block {
  width: 5.5865vw/*80px*/;
  height: 5.5865vw/*80px*/;
  box-sizing: border-box;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  font-size: 1.2rem;
}

.color-red    { background-color: red; }
.color-yellow { background-color: gold; }
.color-green  { background-color: green; }
.color-blue   { background-color: blue; }
.color-white  { background-color: white; color: black; border: 1px solid #aaa; }
.color-black  { background-color: black; }

.draw-button {
  padding: 1vh 3vw;
  font-size: 1.2rem;
  font-family: 'Noto Sans TC', sans-serif;
  border: none;
  border-radius: 10px;
  background-color: #e0e0e0;
  color: #222;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: bold;
}

.draw-button:hover {
  background-color: #c8c8c8;
}


.draw-button:active,
.auto-draw-button:active {
  transform: scale(0.95);
  /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) inset;*/
  transition: transform 0.1s ease/*, box-shadow 0.1s ease*/;
}




#auto-draw-controls {
  /*margin-top: 3vh;*/
  align-items: center;
  gap: 1vh;
}

#interval-select {
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.auto-draw-button {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  color: white;
  background-color: red; /* 初始為停止狀態 */
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.control-panel {
  gap: 2.5vh;
  align-items: center;
}

.auto-draw-controls {
  gap: 0.5vh;
  align-items: center;
}

.countdown {
  font-size: 1rem;
  font-weight: bold;
  color: #444;
}

.auto-draw-button {
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  color: white;
  background-color: red;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* ... 省略你原有的其他樣式 ... */

/* 統一控制面板的樣式 */
.control-panel {
    display: flex;           /* 確保flex容器 */
    flex-direction: column;  /* 垂直排列 */
    gap: 10px;               /* 元件間距 */
    align-items: center;     /* 水平置中 */
    width: 100%;             /* 撐滿容器 */
    /*padding: 10px 0;*/
}

/* 重新抽籤按鈕、自動抽籤按鈕和下拉選單通用大小與字體 */
.control-panel button,
.control-panel select {
    width: 200px;            /* 固定寬度 */
    font-size: 1rem;         /* 字體大小一致 */
    padding: 0.6rem /*1rem*/ 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    cursor: pointer;
    font-weight: bold;
    /*font-family: 'Noto Sans TC', "黑體-繁", "微軟正黑體", sans-serif;*/
    text-align: center;
    transition: background-color 0.3s ease;
}

/* 下拉選單特別調整 */
.control-panel select {
    appearance: none;         /* 標準化下拉外觀 */
    background-color: #fff;

    
    text-align-last: center; /* 針對部分瀏覽器 */
}
select,
select option {
  font-weight: bold;
  text-align: center;
  padding: 0px;
  /*width: 200px;*/
}



/* 按鈕顏色覆蓋 */
.draw-button {
    background-color: #e0e0e0;
    color: #222;
    border: none;
}

.draw-button:hover {
    background-color: #c8c8c8;
}

.auto-draw-button {
    color: white;
    background-color: red; /* 停止狀態 */
}

.auto-draw-button.active,
.auto-draw-button.green {
    background-color: green;
}

/* 自動抽籤倒數文字 */
.countdown {
    font-size: 1rem;
    font-weight: bold;
    color: #444;
    margin-top: 4px;
}

/* 自動抽籤控制區間距微調 */
.auto-draw-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 100%;
}






#timer-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;

  /*border-radius: 10px;
  border: 1px solid #ccc;*/
  padding: 2.5vh;
}

#timer-display {
  font-size: 2.5rem;
  font-weight: bold;
  background: black;
  color: white;
  padding: 2.5vh 5vh;
  border-radius: 10px;
  min-width: 180px;
  text-align: center;
  user-select: none;
  width: 15vw;
}
#timer-controls{
    /*: calc(15vw + 5vh);

    /*display: flex;
    justify-content: space-between;*/
}

#timer-controls button {
  /*margin: 0 0.5rem;
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  background-color: #e0e0e0;
  color: #222;
  transition: background-color 0.3s ease;*/


    width: 100px;            /* 固定寬度 */
    font-size: 1rem;         /* 字體大小一致 */
    padding: 0.6rem /*1rem*/ 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    cursor: pointer;
    font-weight: bold;
    /*font-family: 'Noto Sans TC', "黑體-繁", "微軟正黑體", sans-serif;*/
    text-align: center;
    transition: background-color 0.3s ease;
}

#toggle-timer{
    margin-right: 2.5vh;
    color: white;
    background-color: green;
}


#reset-timer:hover {
  background-color: #c8c8c8;
}

#timer-controls button:active {
  transform: scale(0.95);
  /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) inset;*/
  transition: transform 0.1s ease/*, box-shadow 0.1s ease*/;
}

#timer-display #ms-time {
  font-size: 1rem;
  color: #eee;
  margin-left: 4px;
}