/* 選單切換按鈕 */
* {
    font-family: "Helvetica", "正黑體", "STHeiti", "Microsoft JhengHei", "PingFang TC", "Heiti TC", "Noto Sans TC", sans-serif;
}

#menuToggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 50%, #006064 100%);
    border: 3px solid #84ffff;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 188, 212, 0.5), inset 0 0 20px rgba(132, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

#menuToggle:hover {
    transform: scale(1.15);
    box-shadow: 0 16px 60px rgba(0, 188, 212, 0.7), inset 0 0 60px rgba(132, 255, 255, 0.5);
}

#menuToggle:active {
    transform: scale(0.95);
}

#menuToggle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #84ffff;
    animation: pulse 2s ease-out infinite;
    opacity: 0;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* 底部水平選單欄 */
#bottomMenuBar {
    position: fixed;
    bottom: 60px;
    right: 20px;
    width: auto;
    max-width: 98%;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(0, 188, 212, 0.95) 0%, rgba(0, 151, 167, 0.95) 50%, rgba(0, 96, 100, 0.95) 100%);
    border-radius: 30px;
    padding: 20px;
    z-index: 1500;
    box-shadow: 0 10px 40px rgba(0, 188, 212, 0.5), 0 0 30px rgba(132, 255, 255, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    transform-origin: bottom right;
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#bottomMenuBar.show {
    display: flex;
}

/* 語言切換 */
.language-switch {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 20px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    margin-right: 20px;
}

.lang-btn {
    padding: 10px 20px;
    border: 2px solid white;
    border-radius: 25px;
    background: transparent;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
    box-shadow: none;
}

.lang-btn:hover {
    background: transparent;
    transform: translateY(-3px) scale(1.05);
    box-shadow: none;
    border-color: white;
}

.lang-btn.active {
    background: transparent;
    color: white;
    border-color: white;
    box-shadow: none;
    transform: scale(1.08);
}

/* 選單項目容器 */
.menu-items {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

#bottomMenuBar .menu-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 32px;
    background: transparent;
    border-radius: 24px;
    text-decoration: none;
    color: white;
    font-size: 32px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid white;
    -webkit-tap-highlight-color: transparent;
}

#bottomMenuBar .menu-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(16px);
    box-shadow: 0 8px 32px rgba(0, 188, 212, 0.4);
}

#bottomMenuBar .menu-item:active {
    transform: scale(0.95) translateX(10px);
}

#bottomMenuBar .menu-item.active {
    background: white;
    color: #006064;
    border-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#bottomMenuBar .menu-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* 第一個項目加大 + MORE FEEL */
#bottomMenuBar .menu-item-feel {
    padding: 30px 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    border-radius: 40px;
}

#bottomMenuBar .menu-item-feel .menu-img {
    width: 40px;
    height: 40px;
}

#bottomMenuBar .menu-item-feel .menu-text {
    font-size: 36px;
    font-weight: 700;
}

#bottomMenuBar .menu-item-feel .menu-subtext {
    display: block;
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 4px;
    letter-spacing: 1px;
}

#bottomMenuBar .menu-item-feel:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.1) 100%);
    transform: translateX(20px);
    box-shadow: 0 12px 40px rgba(0, 188, 212, 0.5);
}

/* 底部控制欄 */
#bottomControls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

#soundBtn, #leaderboardBtn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 15px rgba(158, 158, 158, 0.4);
}

#soundBtn:hover, #leaderboardBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(158, 158, 158, 0.6);
}

#soundBtn:active, #leaderboardBtn:active {
    transform: scale(0.95);
}

#soundBtn.muted {
    background: linear-gradient(135deg, #78909c 0%, #546e7a 100%);
}

/* 響應式 */
@media (max-width: 480px) {
    #menuToggle {
        width: 60px;
        height: 60px;
        font-size: 25px;
    }
    
    #bottomMenuBar {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
    
.lang-label {
    color: white;
    font-size: 16px;
    font-weight: bold;
    margin-right: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.lang-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    #bottomMenuBar .menu-item {
        padding: 12px 15px;
        font-size: 16px;
    }
}
