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;
    pointer-events: none;
}
canvas {
    display: block !important;
    opacity: 1 !important;
    width: 100%;
    height: 100%;
}
.container{
    width: 75%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    background-color: color-mix(in srgb, var(--clb-color-black) 20%, transparent);
    padding: 0 25px;
    
}
/*標頭*/
header {
    width: 100%;
    height: 45px;
    display: flex;
    position: fixed;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.container-up {
    width: 100%;
    height: 100%;
    display: block;
    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: 10;
}
.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: 3;
}
.navitem{
    display: flex;
    align-items: center;
    font-weight: bold;
}
.navitem a{
    display: flex;
    flex-direction: column;
    align-items: center;
}
.navitem__text {
    font-size: 18px;
    text-decoration: none;
    color: rgb(91, 91, 91);
    font-weight: 100;
    transition: color 0.3s ease; /* 平滑變色動畫 */
}
.navitem__text:hover {
    color: #000000f0; /* 滑過時變藍色，可改其他顏色 */
}
.submenu {
    display: none;
    position: absolute;
    top: 45px;
    left: 0;
    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: 3;
}
.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;
    position: fixed;
    flex-direction: column;
    cursor: pointer;
    width: 25px;
    justify-content: space-between;
    right: 20px;
    z-index: 10002;
    cursor: pointer;
    pointer-events: auto;
}
.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;
    justify-content: space-between;
    width: 100%;
    height:650px;
    background: rgb(255, 255, 255,0); /* 半透明白色 */
    margin-top: 20px;
    z-index: 5;
}
#three-container,
#three-container canvas {
    pointer-events: none;  /* 讓 hamburger 可以點擊 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.card{
    position: absolute;
    display: none;
    pointer-events: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 10px; 
    font-family: sans-serif;
    max-width: 200px;
    z-index: 20;
    pointer-events: none;
    transform: translate(-50%, -50%);
}
#cards-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
}
.static-card {
    position: absolute;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(245,245,245,0.95));
    border: 1px solid rgba(200,200,200,0.3);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    font-size: 12px;
    min-width: 160px;
    padding: 12px 15px;
    opacity: 0.95;
    user-select: none;
    transition: left 0.2s ease, top 0.2s ease, transform 0.3s ease;
    z-index: 20;
}
.static-card strong {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 5px;
}
.static-card ul {
    margin: 0;
    padding-left: 18px;
    list-style-type: disc;
    color: #000000;
}
.static-card::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    width: 10px;
    height: 10px;
    background-color: #ff6435; /* 或跟 pie 對應色 */
    border-radius: 50%;
}
.pie-hover {
    cursor: pointer;
    transition: transform 0.2s ease;
}
/* 手機版樣式 */
@media (max-width: 768px) {
    #particles-js {
        pointer-events: none;
    }
    header {
        justify-content: space-between; /* 左右分散 */
    }
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    .logo img {
        height: 35px; /* logo 縮小 */
    }
    .container {
        width: 100%;
        justify-content: space-between;
        z-index: 2;
    }
    .static-card {
        position: relative;
        margin: 10px auto;
        max-width: 80%;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
    }
    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: flex-start;
        align-items: center;
        z-index: 10000; /* 高於其他元素 */
        box-sizing: border-box;
        pointer-events: none;
    }
    nav.open {
        transform: translateX(0);
        pointer-events: auto;
    }
    .hamburger {
        display: flex;
        position: relative;
        z-index: 10000; 
    }
    .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);
    }
}
@media (min-width: 1920px) {
    .card{
        max-width: 440px;
    }
}