html,
body {
    margin: 0;
    height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;

    background-image: url('../images/bkg.bmp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.top-bar {
    height: 80px;
    background-color: #333;
    color: white;
    display: flex;
    align-items: center;
    /* justify-content: center; */
}

#top-bar-brand {
    width: 160px;
    height: 60.5px;
    margin-left: 16px;
}

#lang-selector {
    margin-right: 32px;
    margin-left: auto;

    width: 150px;
    height: 38px;
    border-color: #fff;
    cursor: pointer;
    border-radius: 18px;
    border-width: 2px;
    background-color: #333;
    color: #fff;
    padding-left: 10px;

    font-size: 16px;
}

.content {
    flex: 1;
    display: flex;
    /* background-color: #f0f0f0; */
    overflow: auto;
}

.left-content {
    /* background-color: red; */
    width: 20%;
}

.main-content {
    /* background-color: green; */
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* border: 2px solid red; */

    position: relative; /* ⬅️ 讓內部 absolute 定位參考這個區塊 */
}

.title {
    position: absolute;
    top: 0px;
    left: 8px;
    font-size: 32pt;
    font-weight: bold;
    color: #B4DCFF;
}

#device-name {
    position: absolute;
    top: 140px;
    left: 8px;
    color: #fff;
    font-size: 18pt;
    font-weight: bold;
}

#select-version-content {
    position: absolute;
    top: 180px;
    left: 8px;
}

.image-row {
    display: flex;
    /* justify-content: center; */
    /* background-color: #08af002d; */
    /* padding: 20px 0; */
}

.image-device {
    position: absolute;
    top: 260px;
    left: 8px;
    /* background-color: #333; */
}

/* .image-row img {
    width: 80%;
} */

#version-content {
    /* background-color: rebeccapurple; */
    position: absolute;
    top:16%;
    left:38%;
    width: 60%;
    height: 80%;
    padding: 8px;
    overflow-y: auto;
    font-size: 12pt;
    /* font-weight: bold; */
    color: #FFF;
    word-wrap: break-word;
    border: 2px solid #7f7f7f7f;
    border-radius: 16px;
    background-color: #3f7f7f7f;
}

.right-content {
    /* background-color: black; */
    width: 20%;
}

.bottom-bar {
    display: flex;
    height: 120px;
    align-items: center;
    justify-content: center; 
    /* background-color: #333;
    color: white;
    align-items: center;
    justify-content: center; */
    
}

#bottom-bar-content {
    display: flex;
    width: 60%;
    height: 100px;
    border-radius: 10px;
    background-color: #0d1a2699;
}

#prompt {
    position: relative;
    /* 讓裡面的元素可以定位 */
    width: 80%;
    /* height: 80px; */
    /* background-color: beige; */
}

#prompt-text {
    position: absolute;
    margin: 4px;
    color: #fff;
    font-size: 16pt;
    line-height: 1.3;
    /* background-color: gray; */
}

#prompt-text-support-deivce {
    position: absolute;
    margin: 4px;
    color: #E8D098; 
    font-weight: bold;
    font-size: 12pt;
    line-height: 1.3;
    top: 32px;
    /* background-color: gray; */
}

#currentVer-text {
    position: absolute;
    margin: 4px;
    color: #FF4500;
    font-weight: bold;
    font-size: 16pt;
    /* background-color: gray; */
}

#button-content {
    display: flex;
    align-items: center;
    justify-content: center; 
    width: 20%;
    /* height: 80px; */
    /* background-color: red; */
}

/* 漸層按鈕樣式 */
#connectButton {
    background: linear-gradient(90deg, #ff7a18, #af002d);
    border: none;
    color: white;

    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;

    width: 125px;
    height: 50px;

    /* 加上 transition 讓 hover 更順 */
    transition: all 0.2s ease;
}

#connectButton:hover {
    /* 字體顏色變淡 */
    color: yellow;

    /* 立體浮起感：陰影 + 上移 */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    /* transform: translateY(-3px); */
    transform: translate(-2px, -2px);
}

#connectButton:active {
    transform: translateY(1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#select-version {
    width: 240px;
    height: 32px;
    font-family: Calibri, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: black;
    border-radius: 5px;
    border: transparent;
    background-image: linear-gradient(to bottom, #777B7E 0%, #E1EAEE 65%);
}



.grid-container {
    width: 60%;
    display: grid;
    /* 3欄 */
    grid-template-columns: repeat(3, 1fr);
    /* 2列 (可省略，會自動排) */
    grid-template-rows: repeat(1, 1fr);   
    /* 格子之間的間距 */
    gap: 2px;
}

.grid-item {
  /* background-color: #ccc; */
  /* border: 1px solid #999; */
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-text-button {
  position: relative;
  /* width: 100px; */
  /* height: 100px;
  /* padding: 0; */
  /* border: none; */
  /* background-color: transparent; */
  /* background: rgba(0, 0, 0, 0.6); */
  cursor: pointer;
  overflow: hidden;
  border-radius: 12px;
  border: 2px solid #777;

}

/* .img-text-button:before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px; 
    padding: 2px; 

    background:linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet); 
    background-size: 200% 100%; /* 關鍵：讓漸層能移動 */
    
    /* mask: 
      linear-gradient(#000 0 0) content-box, 
      linear-gradient(#000 0 0);
    mask-composite: exclude; 
    -webkit-mask-composite: destination-out; /* 為了 WebKit 瀏覽器 */

     /*transition: background-position 0.3s ease; */
 /* } */



  /* ✅ hover 時啟動動畫 */
.img-text-button:hover::before {
    /* padding: 4px;  */

    content: "";
    position: absolute;
    inset: 0;
    border: transparent;
    border-radius: 16px;
    padding: 4px;
    
    background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
    /* 關鍵：讓漸層能移動 */
    background-size: 200% 100%;
        
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    /* 為了 WebKit 瀏覽器 */
    -webkit-mask-composite: destination-out;  
    animation: rainbowFlow 3s linear infinite;
}

.img-text-button:hover {
    border: transparent;   
}

/* ✅ 定義動畫：背景位置向右移動 */
@keyframes rainbowFlow {
    0% {
      background-position: 0% 0%;
    }
    100% {
      background-position: 100% 0%;
    }
}

.img-text-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.img-text-button span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6); /* 半透明背景可選 */
    color: white;
    font-size: 14pt;
    padding: 4px;
    text-align: center;
    margin-left: 2px;
    margin-bottom: 2px;
    margin-right: 2px;
    border-radius: 0px 0px 10px 10px;
}

/* .img-text-button:hover {
    border: 4px solid #00f;
    box-shadow: 0 8px 16px rgba(255, 0, 0, 0.3);
    filter: brightness(1.2);
} */

.img-text-button:hover span {
    margin-left: 4px;
    margin-bottom: 4px;
    margin-right: 4px;
    font-weight: bold;
}
