html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: auto;
}

.header {
    text-align: center;
}

.tooltip {
    position: relative;
    cursor: pointer;
    color: blue; /* 可視需求調整文字顏色 */
}

.tooltip::after {
    content: attr(data-tooltip);  /* 從 data-tooltip 取得浮動框內容 */
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;  /* 顯示在文字下方 */
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    background-color: rgba(255, 255, 0, 0.8); /* 半透明黃色背景 */
    color: black;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    transition: visibility 0.2s ease, opacity 0.2s ease;
    z-index: 10;
    white-space: normal;
    text-align: center;
}

/* 懸停 tooltip 顯示浮動框 */
.tooltip:hover::after {
    visibility: visible;
    opacity: 1;
}

/* 偵測螢幕邊緣，讓浮動框保持可見 */
@media (max-width: 768px) {
    .tooltip-box {
        left: 0; /* 靠左對齊，避免超出螢幕 */
        transform: none;
    }
}

/*
.header h1 {
    font-size: 24px;
    margin: 10px 0;
    text-align: center;
}

.header h2 {
    color: Navy;
    font-size: 24px;
    margin: 10px 0;
    text-align: center;
}
*/

.banner, .lang-banner {
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    margin-top: 10px;
    margin-bottom: 20px;
    position: relative;
}

.banner {
    background-color: Navy;
    width: 100%;
}

@media (max-width: 768px) {
    .banner, .lang-banner {
        height: auto;
        min-height: 40px;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 5px 20px;
        box-sizing: border-box;
    }

    .menu-switch, .lang-switch {
        position: static;
    }

    .menu-switch a, .lang-switch a {
        display: inline-block;
        margin: 3px 5px 3px 0;
    }
}

.menu-switch {
    position: absolute;
    left: 20px;
}

.menu-switch a {
    background-color: white;
    padding: 5px 10px;
    margin-left: 10px;
    border-radius: 5px;
    text-decoration: none;
}

.menu-switch a:hover {
    background-color: Aquamarine;
}

.lang-switch {
    position: absolute;
    right: 20px;
}

.lang-switch a {
    background-color: white;
    padding: 5px 10px;
    margin-left: 10px;
    border-radius: 5px;
    text-decoration: none;
}

.lang-switch a:hover {
    background-color: Aquamarine;
}

.container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.year {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 70px;
    flex-shrink: 0;
}

.year-box {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 5px 10px;
    border: 2px solid Navy;
    font-size: 16px;
    font-weight: bold;
    background-color: Navy;
    margin-bottom: 5px;
}

.month-text {
    display: block;
    color: white;
    font-size: 14px;
    margin-left: 0;
    text-decoration: none;
    pointer-events: none;
}

.year-text {
    color: yellow;
    text-decoration: none;
    pointer-events: none;
}

a .month-text, a .year-text {
    text-decoration: none;
    pointer-events: none;
}

.timeline-item[data-years="10"] .line {
    height: 300px;
}

.timeline-item[data-years="8_5"] .line {
    height: 255px;
}

.timeline-item[data-years="5_5"] .line {
    height: 165px;
}

.timeline-item[data-years="4"] .line {
    height: 120px;
}

.timeline-item[data-years="3"] .line {
    height: 90px;
}

.timeline-item[data-years="2"] .line {
    height: 60px;
}

.timeline-item[data-years="1"] .line {
    height: 30px;
}

.timeline-item[data-years="0_5"] .line {
    height: 15px;
}

.line {
    width: 2px;
    background-color: Navy;
    margin-top: 5px;
    margin-bottom: 5px;
}

.content {
    flex-grow: 1;
}

.footer {
    background-color: LightCyan;
    text-align: left;
    padding: 20px;
    border-top: 1px solid #ccc;
    width: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px; /* 控制每一列之間的間距 */
}

.contact-item img {
    width: 30px; /* 調整圖示大小 */
    height: 30px;
    margin-right: 10px; /* 圖示與文字之間的間距 */
}


@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .year {
        width: 60px;
    }
}


.performance-image {
    width: 90vw;
    max-width: 660px;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 50%;
}
