* {
    padding: 0;
    margin: 0;
    box-sizing:  border-box;
}

body {
    /* 豆沙色背景 */
    /*background-color: #C7EDCC;*/
    font-family: Arial, sans-serif;
    /* 這裡控制所有物件置中*/
    text-align: center;
    /* Text color */
    /*color: #333;*/
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh; /* 100% of the viewport height */
    padding: 20px;
}

/* hero 控制整個背景*/
.hero {
    height: 100vh;
    width: 100%;
    /*background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6), url('./images/background.png'));*/
    /*background-image: url('./images/background.png');*/
    background-image: url(images/background.png);
    background-size: cover;
    background-position: center;
}

/* 控制條幅 */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* 這裡控制上方條幅的高度*/
    padding: 20px;
    /* 這裡控制左方按鈕的距離 */
    padding-right: 10%;
    /* 這裡控制右方按鈕的距離 */
    padding-left: 10%;
    background: rgb(2 10 61 / 80%);
    border-radius: 10px;
}

/* 左邊：靠左、內容橫向排、保留你原本的 gap */
.left-wrapper {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    align-items: center;
    flex: 1;                 /* 吃掉左側可用空間 */
}

/* 中間（你的 nav > ul 就是中間區塊）：置中 */
nav > ul {
    display: flex;           /* 讓「中文打字／英文打字」橫向排列 */
    gap: 20px;               /* 中間兩個 li 的距離 */
    margin: 0 auto;          /* 關鍵：把整個 ul 置中 */
    padding: 0;
}

/* 右邊：靠右 */
.logout-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    flex: 1;                 /* 吃掉右側可用空間 */
}

.logo {
    /*color: #accae5;*/
    color: white;
    font-size: 26px;
    font-family: fangsong;
    position: relative;
}

span {
    color: #cdb330;
}

nav ul li {
    list-style-type: none;
    display: inline-block;
    padding: 10px 20px;
    font-size: 20px;
    position: relative;
}

nav ul li a{
    color: white;
    text-decoration: none;
    font-weight: bold;

    display: block;
    text-align: center;
}

nav ul li a:hover{
    color: rgb(147, 159, 236);
    transition: 0.3s;
}

/* dropdown 是顯示下拉式選單 */
nav ul li ul.dropdown li{
    display: block;
}

/* dropdown 是顯示下拉式選單 */
nav ul li ul.dropdown {
    width: 100%;
    /*background: #a6cae9;*/
    background: #1c4466;
    position: absolute;
    z-index: 999;
    display: none;
    right: 0;
    /*opacity: .5;*/
}

/* dropdown 是顯示下拉式選單 */
nav ul li:hover ul.dropdown{
    display: block;
}

.titleClass {
    color: white;
    font-weight: bold;
    font-size: 70px;
    position: relative;
}

.title2Class {
    color: white;
    font-weight: bold;
    font-size: 60px;
}

label {
    font-size: 24px; /* Adjust the font size as needed */
}

.username {
    color: white;     /* 字體顏色改成白色 */
    font-size: 16px;  /* 字體大小 16px */
}

#questionID {
    /*background: #1c68aa;*/
    font-size: 60px; /* Larger font size for the question label */
    color: white;
    transition: 0.4s;
}

input {
    padding: 5px;
    font-size: 60px; /* Adjust the font size for the input field */
    align-items: center;
    /* 這一行可以讓輸入的文字置中*/
    text-align: center;
}

#startID {
    font-weight: bold;
    font-size: 40px; /* Adjust the font size for the "Start" button */
    background-color: #0074d9; /* Button background color */
    color: #fff; /* Button text color */
    padding: 10px 20px;
    border: none;
    border-radius: 60px;
    margin-top: 20px; /* Add some space above the button */
    transition: 0.4s;
}

#startID:hover {
    /*background-color: #5da5e5; /* Button background color on hover */
    transform: scale(1.2);
    cursor: pointer;
}

/* 顯示團隊的小視窗按鈕 */
.showTeamClass {
    /*background: #4da0e8;*/
    font-weight: bold;
    font-size: 20px;
    background: #0074d9;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    transition: 0.4s;
}

/* 顯示團隊的小視窗按鈕 */
.showTeamClass:hover {
    transform: scale(1.2);
    cursor: pointer;
}

#resetID {
    /*background: #4da0e8;*/
    font-weight: bold;
    font-size: 20px;
    background: #0074d9;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    transition: 0.4s;
}

#resetID:hover {
    transform: scale(1.2);
    cursor: pointer;
}

/* 錯誤的圖示 */
#crossmarkID {
    position: absolute;
    left: 1100px;
    top: 340px;
    width: 100px;
    height: 100px;
    display: none;
}

/* 看答案按鈕的設定-----------不一樣的按鈕格式 */
#answerBtnID {
    position: absolute;
    left: 1200px;
    top: 550px;
    width: 160px;
    display: none;
}

/* 看答案按鈕變大 */
#answerBtnID:hover {
    transform: scale(1.2);
    cursor: pointer;
}

#answerImageID {
    position: absolute;
    width: 150px;
    left: 150px;
    top: 350px;
    display: none;
}

#timerID{
    width: 200px;
    /* 加上這一行可以控制 label 的長度 */
    display: inline-block;
    text-align: center;
}

#numberID{
    width: 150px;
    display: inline-block;
    /* 加上這一行可以控制 label 的長度 */
    text-align: center;
}

#scoreID{
    width: 100px;
    display: inline-block;
    /* 加上這一行可以控制 label 的長度 */
    text-align: center;
}

/* Center the image and position the close button */
.closeContainer {
    text-align: center;
    margin: 24px 0 12px 0;
    position: relative;
}
  
img.doctor {
    /* 原來是 width: 40% */
    width: 100px;
    border-radius: 50px;
}

/* 讓裡面的 div 並排*/
.flex-Container{
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-content: flex-start;
}

.centerContainer {
  text-align: center;
  padding: 16px;
}

span.psw {
  float: right;
  padding-top: 16px;
}

/* 視窗 The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  padding-top: 60px;
}

/* 視窗內容 Modal Content/Box */
.modal-content {
  background-color: #fefefe;
  margin: 5% auto 15% auto; /* 5% from the top, 15% from the bottom and centered */
  border: 1px solid #888;
  width: 50%; /* Could be more or less, depending on screen size */
}

/* The Close Button (x) */
.closeBox {
  position: absolute;
  right: 25px;
  top: 0;
  color: #000;
  font-size: 35px;
  font-weight: bold;
}

.closeBox:hover,
.closeBox:focus {
  color: red;
  cursor: pointer;
}

/*這裡是 mission alert window */
.missionButtonClass {
  background-color: #468ef3;
  color: white;
  padding: 14px 20px;
  margin: 8px 0;
  border: none;
  cursor: pointer;
  width: 100%;
  font-size: 24px; /* Set the desired font size here */
}

.missionButtonClass:hover {
  opacity: 0.8;
}

/* Add Zoom Animation */
.animate {
  -webkit-animation: animatezoom 0.6s;
  animation: animatezoom 0.6s
}

@-webkit-keyframes animatezoom {
  from {-webkit-transform: scale(0)} 
  to {-webkit-transform: scale(1)}
}
  
@keyframes animatezoom {
  from {transform: scale(0)} 
  to {transform: scale(1)}
}

/* Change styles for span and cancel button on extra small screens */
@media screen and (max-width: 300px) {
  span.psw {
     display: block;
     float: none;
  }
}

@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .left-wrapper,
  .logout-wrapper {
    flex: 1 1 100%;
    justify-content: center;   /* 小螢幕時左右都置中 */
  }
  nav > ul {
    order: 2;                  /* 讓中間選單在第二行（可依需要調整） */
  }
}