/* 基本設置 */
:root {
    --global-font-size: 1rem;
    /* 預設全局字體大小 */
}

body {
    font-size: var(--global-font-size);
    /* 使用全局字體大小 */
}

#container {
    padding-bottom: 75px;
}

/* 頂部區塊樣式 */
.navbar {
    background-color: #f8f9fa;
    padding: 10px 20px;
    border-bottom: 2px solid #e5e5e5;
    box-shadow: 0px 4px 8px -3px rgba(255, 165, 0, 0.8);
}

.navbar img {
    max-height: 40px;
}

.menu-btn a,
.menu-btn {
    font-size: calc(var(--global-font-size) * (24 / 16));
    color: #800000;
}

/* 返回標題區塊樣式 */
.header-bar {
    min-height: 42px;
    background-color: #800000;
    color: white;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    position: relative;
    box-shadow: 0px 4px 8px -3px rgba(255, 165, 0, 0.8);
}

.header-bar svg {
    font-size: calc(var(--global-font-size) * (24 / 16));
    margin-right: 10px;
}

.header-bar p {
    margin: 0;
    font-size: calc(var(--global-font-size) * (18 / 16));
    flex-grow: 1;
    text-align: center;
}

.header-bar .back-btn {
    position: absolute;
    left: 20px;
    color: white;
    font-size: calc(var(--global-font-size) * (24 / 16));
    cursor: pointer;
}



/* 底部按鈕區塊 */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    background-color: #ffffff;
    border-top: 1px solid #e5e5e5;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
}

/* 增加分隔線 */
.footer div:not(:last-child) {
    border-right: 1px solid #e5e5e5;
}

/* 預設按鈕樣式 */
.footer div {
    position: relative;
    text-align: center;
    flex: 1;
}

.footer div svg {
    /* 這邊要固定svg大小，否則會跑版 */
    font-size: 24px;
    color: #ccc;
}

.footer div p {
    margin: 0;
    font-size: calc(var(--global-font-size) * (14 / 16));
    color: #ccc;
}

/* 點擊後樣式 */
.footer div.active svg {
    color: #fff;
}

.footer div.active p {
    color: #800000;
}

.footer div.active::before {
    content: "";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background-color: #800000;
    border: 2px solid #FFD700;
    border-radius: 50%;
    z-index: 1;
}

.footer div.active svg {
    position: relative;
    top: -18px;
    z-index: 2;
}

.footer div.active p {
    position: relative;
    z-index: 2;
}
