/* 基本重置樣式 */
html, body {
    margin: 0;
    font-family: Roboto, sans-serif;
    overflow-x: hidden;
    max-width: 100vw;
}
/* 容器样式 */
.container {
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
}
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 80px;
    background-color: #ffffff;
    padding: 0 20px;
    border-bottom: 1px solid #4d4d4d; /* 添加分隔线 */
}
/* 桌面版隱藏漢堡菜單按鈕 */
.menu-toggle {
    display: none;
}
.nav {
    display: flex;
    gap: 40px;
}
/* 分頁銜接样式 */
.nav a {
    color: #000000;
    font-size: 25px;
    text-decoration: none;
    font-weight: 450;
}
.nav a:hover {
    text-decoration: underline;
}

/*對buttom 預設值做修改*/
.button {
    appearance: none;
    text-rendering: auto;
    color: buttontext;
    letter-spacing: normal;
    word-spacing: normal;
    line-height: normal;
    text-transform: none;
    text-indent: 0px;
    text-shadow: none;
    display: inline-block;
    text-align: center;
    align-items: flex-start;
    cursor: pointer;
    box-sizing: border-box;
    background-color: transparent; /* Remove background color */
    margin: 0em;
    padding-block: 1px;
    padding-inline: 6px;
    border: none; /* Remove border */
    transition: background-color 0.3s, color 0.3s, opacity 0.3s;
}

button:hover:not(:disabled) {
    background-color: #e0f2fe; /* 滑過時的背景顏色（淺藍色 sky-100） */
}

button:disabled {
    background-color: #d3d3d3 !important; /* 禁用時的背景顏色 */
    color: #a0a0a0 !important;            /* 禁用時的文字顏色 */
    border: 1px solid #a0a0a0 !important; /* 禁用時的邊框顏色 */
    cursor: not-allowed !important;       /* 禁用時的鼠標圖示 */
    opacity: 0.8 !important;              /* 禁用時的透明度 */
    box-shadow: none !important;          /* 去除陰影效果 */
    text-shadow: none !important;         /* 去除文字陰影 */
    transition: none !important;          /* 禁用狀態下無過渡效果 */
}

/* 禁用狀態下的 :hover 效果完全覆蓋 */
button:disabled:hover,
button:disabled:focus,
button:disabled:active {
    background-color: #d3d3d3;
    color: #a0a0a0;
    cursor: not-allowed;
    box-shadow: none;
    text-shadow: none;
    transform: none;
}
.logo-icon {
    width: 48px;
    height: 48px;
    vertical-align: middle;
    margin-right: 8px;
  }
/* title -> trademark comparison */
.title {
    color: #000000;
    font-size: 30px;
    font-weight: 500;
    background-color: transparent; /* Remove background color */
    border: none; /* Remove border */
}

/* 内容 */
.content {
    width: 100%;
    padding: 20px;
}

.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.upload-container {
    display: flex;
    justify-content: space-between;
}

.image-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px;
}

.image-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    margin: 10px;
    overflow: hidden; /* 確保圖片不會超出框框 */
}
  
.image-box img {
width: 100%;
height: 100%;
object-fit: contain;
}

/*-------------------------------------這之上是固定樣式-------------------------------------*/

/* 標題樣式 */
h1, h2, h3 {
    color: #333; /* 標題顏色 */
    margin-bottom: 0.5em; /* 標題下方間距 */
}

/* 分隔線樣式 */
hr {
    border: 0;
    height: 1px;
    background: #ddd; /* 分隔線顏色 */
    margin: 20px 0; /* 分隔線上下間距 */
}

/* 內容區域樣式 */
.container {
    max-width: 1200px; /* 最大寬度 */
    margin: 0 auto; /* 自動水平居中 */
    padding: 20px; /* 內邊距 */
}

/* 數學公式區域樣式 */
.equation, p {
    background: #f4f4f4; /* 背景顏色 */
    padding: 10px; /* 內邊距 */
    border-left: 3px solid #ddd; /* 左邊框樣式 */
    margin: 10px 0; /* 上下間距 */
}


/* 標頭樣式 */
header {
    background: #333; /* 背景顏色 */
    color: #fff; /* 文字顏色 */
    padding: 10px 0; /* 上下內邊距 */
    text-align: center; /* 文字置中 */
}

/* 分隔線樣式 */
.divider {
    border-top: 2px solid #ddd; /* 上邊框樣式 */
    margin: 20px 0; /* 上下間距 */
}

/* 結果顯示區塊樣式 */
.result-title{
    color: #000000; /* 標題顏色 */
    margin-bottom: 0.5em; /* 標題下方間距 */
    text-align: center; /*文字置中*/
    font-weight: bold; /*文字加粗*/
}
.result-container {
    width: 80%;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.label {
    font-weight: bold;
    color: #333;
}

.value {
    color: #666;
}
  .footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px 0;
  }

  .footer-text {
    text-align: center;
  }

  /* RWD */

  @media (max-width: 768px) {
    .content, .section {
      /* padding: 0; */
      width: 95%;
      box-sizing: content-box;
      font-size: 0.9em; /* 調整字型大小為原來的 80% */
    }
    /* 漢堡菜單按鈕樣式 */
    .menu-toggle {
        display: block;
        cursor: pointer;
        font-size: 24px;
    }
    /* 隱藏導航欄，添加漢堡菜單按鈕 */
    .nav {
        display: none;
        flex-direction: column;
        gap: 10px;
        position: absolute;
        top: 80px;
        right: 0;
        width: 160px;
        background-color: #eeeeee;
        padding: 10px;
        border-top: 1px solid #4d4d4d;
        border: 1px solid #000000;
        z-index: 10;
    }
    .nav a {
      color: #000000;
      font-size: 0.9em;
      text-decoration: none;
      font-weight: 450;
    }

    .nav.show {
        display: flex;
    }

    .nav-link {
        text-align: center; /* 文字置中 */
        display: block;
        padding: 10px 0; /* 調整上下內距 */
        color: black;
        text-decoration: none;
    }
    .upload-container {
        width: 95vw;
        justify-content: center;
    }
    .upload-button {
        font-size: 1.2em;
        //width: 140px;
        width: 100%;
    }
    .image-box {
      width: 160px;
      height: 160px;
      margin: 0;
    }
    .comparison-result {
      flex-direction: column;
      align-items: center;
    }
    .result-item {
      /* width: calc(100% - 40px); 在小屏幕上每个项目占满宽度 */
      width: 100%;
    }
    .feature-selection-row1, .feature-selection-row2 {
        flex-direction: column;
    }

  }

