html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #e9e9e9; /* 看得清楚粒子 */
    scroll-behavior: smooth;
}
/*背景粒子*/
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
canvas {
    display: block !important;
    opacity: 1 !important;
}
.container{
    width: 75%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background:color-mix(in srgb, var(--clb-color-black) 20%, transparent);
    padding: 0 25px;
    z-index: 10;
}
/*標頭*/
header {
    width: 100%;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}
.container-up {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    justify-content: space-between;
    background:color-mix(in srgb, var(--clb-color-black) 20%, transparent);
    align-items: center;
}
.container-head {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    background:color-mix(in srgb, var(--clb-color-black) 20%, transparent);
    align-items: center;
}
.logo{
    align-self: flex-end;
    font-weight: bold;
    font-size: 30px;
    align-items: center;
}
.logo img{
    height:45px;
    width: auto;
    justify-content: center;
}
.container-title{
    font-family: Roboto, sans-serif;
    display:block ;
    margin-top: 10%;
    align-items: center;
    z-index: 3;
}
.webname{
    font-size: 20px;
    font-weight: 500;
    font-style: normal;
    text-align: center;
    color:#ff6435;
}
.slogan{
    font-size: 40px;
    font-weight: 650;
    font-style: normal;
    text-align: center;
    margin-top:0.5%;
    color:rgb(68, 68, 68);
}
.title-gif {
    width: 18px;/* 根據需求調整大小 */
    height: auto;
    vertical-align: middle;
    margin-bottom: 5px;
}
nav{
    font-family: "DM Serif Text", serif;
    display: flex;
    gap: 15px;
    z-index: 50;
}
.navitem{
    display: flex;
    align-items: center;
    font-weight: bold;
    z-index: 5;
}
.navitem a{
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}
.navitem__text {
    font-size: 18px;
    text-decoration: none;
    color: rgb(91, 91, 91);
    font-weight: 100;
    transition: color 0.3s ease; /* 平滑變色動畫 */
    z-index: 5;
}
.navitem__text:hover {
    color: #000000f0; /* 滑過時變藍色，可改其他顏色 */
}
.submenu {
    display: flex;
    position: fixed;
    top: 100%;
    left: 100%;
    min-width: 150px;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: center;/* 文字也置中 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 1); /* 半透明白色 */
    z-index: 99;
}
.submenu a {
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}
.submenu.show{
    display: flex;
}
.submenu a:first-child {
    border-left: none;
}
.submenu a:hover {
    background: rgba(255, 255, 255, 0.75); /* 半透明白色 */
}
.submenu--right {
    min-width: 100%;
    left: 0;       /* 從最左邊展開 */
    top: 45px;     /* 跟 header 高度對齊 */
}
.submenu .back-button {
    display: none !important;
}
/* 漢堡選單按鈕 - 手機版用 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 25px;
    justify-content: space-between;
    right: 20px;
    z-index: 100;
}
.hamburger div {
    height: 3px;
    border-radius: 2px;
    margin: 4px 0; /* 通常會有間距讓三條線分開 */
    background-color: #ffffff;  /* 一定要有背景色，才看得到 */
    transition: all 0.3s ease;
}
.container-mid{
    display: flex;
    flex-wrap: wrap;
    position: relative;
    width: 100%;
    height: auto;
    background: rgb(255, 255, 255,0); /* 半透明白色 */
    z-index: 3;
}
/* 確保 3D 容器有高度 */
.container-3D {
    width: 100%;
    height: 700px;
}
.main-wrapper {
    display: flex;
    width: 100%;   /* 設置父容器的寬度 */
    height: 100%;  /* 根據內容調整高度 */
    
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.75);
}
.main-container1{
    width: 35%;
    min-width: 350px; /* 避免框框太小 */
    max-height: 700px;
    padding: 10px;
    border: 2px solid #f2f2f2; /* 框框邊界 */
    border-radius: 10px; /* 讓邊角圓滑 */
    background-color: #f4f6f5; /* 背景顏色 */
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.1); /* 陰影讓框框更明顯 */
}
.main-container2{
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;  /* 垂直排列元素 */
    align-items: left; 
}
.main-container3{
    flex: 1;
    justify-content: center;
    align-items: center;
    flex-direction: column;  /* 垂直排列元素 */
}
.main-container4 {
    flex: 1;
    padding: 10px;
    gap: 10px;
    display: flex;
    align-items: center; 
}
.parent-container1 {
    padding-top: 10px;
    display: flex;
    justify-content: space-between; /* 可以調整間隔 */
    align-items: flex-start; /* 可根據需求調整對齊方式 */
}
.main-container2,.main-container3 h2{
    text-align: center;
    font-size: 15px;

}
.nav-tabs .nav-link.active{
    color:white;
    border-color: #ffffff;
    background-color: #007bff;
    border-bottom: 2px solid #007bff;
}
.nav-tabs .nav-link{
    color: #555;
    font-size: 16px;
    font-weight: bold;
    padding: 12px 10px;
    border-radius: 10px 10px 0 0; /* 讓上方圓角 */
    border: none;
    background-color: #f1f1f1;
    transition: all 0.3s ease-in-out;
}
/* 滑鼠懸停效果 */
.nav-tabs .nav-link:hover {
    background-color: #e0e0e0;
    color: #007bff;
}
.nav-justified .nav-link {
    flex-grow: 1;
    text-align: center;
}
.slider-block {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: 0 auto; /* 居中對齊 */
    padding: 20px;
}
.slider-item {
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.demonstration {
    font-family: Microsoft JhengHei;
    font-size: 16px;
    font-weight: 600;
}
input[type="number"] {
    width: 175px; /* 設定寬度 */
    padding: 4px; /* 內邊距，讓輸入框更緊湊 */
    font-size: 14px; /* 控制字體大小 */
}
/* 自訂滑桿樣式 */
input[type="range"] {
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
    transition: background 0.3s;
}
/* 滑桿拖動條 */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
/* Firefox 支援 */
input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}
/* 顯示數值的樣式 */
span {
    margin-top: 5px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}
/* 滾動區域 */
.el-scrollbar {
    max-height: 800px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.control-inputs label,
.control-inputs input{
    font-size: 18px;
    display: block;
    margin-bottom: 10px; /* 添加間距 */
}
.input-group {
    display: flex;
    align-items: center; /* 讓 label 和 input 垂直置中 */
    gap: 10px; /* 讓 label 和 input 之間有間距 */
}
#coordinate-display ,.control-inputs, .control-inputs p{
    font-size: 20px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center; /* 讓 input 水平置中 */
    font-weight: bold;  /* 確保字體加粗 */
    margin-top: 5px;
}
.control-inputs button {
    background-color: #28a745;  /* 統一為藍色 (可以改成其他顏色) */
    color: white;  /* 文字顏色 */
    font-size: 16px;
    padding: 10px 10px;
    border: none;
    border-radius: 5px;  /* 圓角 */
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    margin-top: 10px;  /* 增加上下間距，避免按鈕太靠近 */
    display: block;  /* 讓按鈕單獨一行 */
    width: 80%;  /* 讓按鈕寬度一致 */
    text-align: center;
}
/* 滑鼠懸停效果 */
.control-inputs button:hover {
    background-color: #e68900;  /* 深藍色 */
}
.tab-content{
    height: 500px;
}
#menu3{
    border-radius: 8px;
}
#menu3 h3 {
    font-family:Microsoft JhengHei;  
    font-weight: bold;
    text-align: center;
}
#menu4 h3 ,h4{
    font-family:Microsoft JhengHei;  
    font-weight: bold;
    text-align: center;
}
#coordinate-display {
    margin-left: 65px; /* 讓它稍微往右 */
    font-weight: bold;
    font-size: 16px;
    display: block;
    width: 175px;
}
/* 編輯器區域 */
#python-code {
    width: 100%;
    height: 250px;
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    background-color:#333333;
    color: #f8f8f2;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    resize: vertical;
}
/* 按鈕樣式 */
#execute-button {
    font-family:Microsoft JhengHei;  
    display: block;
    padding: 5px 10px;
    font-size: 16px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}
#execute-button:hover {
    background-color:#e68900;
}
/* 終端機風格的輸出區塊 */
#output-area {
    background-color: #000;
    color: #0f0;
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    padding: 10px;
    min-height: 100px;
    border-radius: 5px;
    overflow-y: auto;
    white-space: pre-wrap;
    border: 1px solid #333;
}
#camera {
    width: 100%;
    border-radius: 10px;
    border: 2px solid #ddd; /* 輕微邊框 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* 添加陰影使視頻區域更立體 */
    object-fit: cover; /* 保持視頻比例 */
}
/* 控制區 */
.btn-group {
    font-family: Microsoft JhengHei;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}
.btn {
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}
/* 錄製影片區 */
.motion-list {
    list-style-type: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.motion-list li {
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    text-align: center;
}
.motion-list video {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
/* 影片縮略圖按鈕 */
.motion-list .video-item {
    position: relative;
    padding-bottom: 10px;
}
.motion-list .video-item video {
    max-height: auto;
    margin-bottom: 10px;
}
/* ===== Mobile HUD ===== */
#mobile-hud {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 16px;
  font-size: 14px;
  font-family: monospace;
  display: none;            /* 預設隱藏 */
  z-index: 9999;
  pointer-events: none;     /* 不擋 3D 操作 */
}
#mobile-hud div {
  line-height: 1.4;
  white-space: nowrap;
}
/* 手機版樣式 */
@media (max-width: 768px) {
    #particles-js {
        pointer-events: none;
        z-index: 0;           /* 背景層 */
    }
    header {
        justify-content: space-between; /* 左右分散 */
        z-index: 10;
    }
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    .logo img {
        height: 35px; /* logo 縮小 */
    }
    .container {
        width: 100%;
        justify-content: space-between;
        z-index: 2;
    }
    .main-container1 {
        display: none;
    }
    nav {
        position: fixed;
        top: 45px;
        left: 0;
        width: 100%;
        flex-direction: column;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        background-color: rgba(255, 255, 255);
        text-align: center;
        justify-content: center;
        align-items: center;
        z-index: 9999; 
    }
    nav.open {
        transform: translateX(0);
    }
    .hamburger {
        display: flex;
        position: relative;
        z-index: 10000; /* 確保高於 nav */
    }
    .submenu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        transform: translateX(100vw);
        transition: transform 0.3s ease;
    }
    .submenu.show {
        transform: translateX(0);
    }
    .submenu .back-button {
        display: block !important;
        font-weight: bold;
        color: #555;
        align-self: flex-start; /* 靠左放（可改 center） */
    }
    .webname{
        font-size: 15px;
        font-weight: 500;
        font-style: normal;
        text-align: center;
        color:#ff6435;
    }
    .slogan{
        font-size: 30px;
        font-weight: 650;
        font-style: normal;
        text-align: center;
        margin-top:0.5%;
        color:rgb(68, 68, 68);
    }
    .calendar-wrapper {
        padding-bottom: 200%; /* 拉長高度：比例可調，例如120% 或更高 */
    }
     #mobile-hud {
        display: block;
        z-index: 10;
    }
}