/* 动态岛核心样式 www.902d.com*/
.dynamic-island {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    transform-origin: center;
    width: auto;
    max-width: 80%;
    height: 40px;
    background-color: #000;
    border-radius: 25px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.4s ease-in-out,
                height 0.6s ease-in-out,
                border-radius 0.6s ease-in-out,
                box-shadow 0.5s ease-in-out,
                opacity 0.5s ease-in-out;
    overflow: visible;
    z-index: 9998;                       /* 高于普通内容与侧栏，低于星云过渡(9999)与弹窗(≥10000) */
    padding-left: 35px;
    padding-right: 20px;
    opacity: 0;
    box-shadow: 0 0px 10px rgba(0,0,0,0.45);
}

.dynamic-island.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

.dynamic-island.inactive {
    transform: translateX(-50%) scale(0);
    opacity: 0;
}

/* 内容区域 */
.island-content {
    opacity: 0;
    transition: opacity 0.9s ease-in-out, filter 0.8s ease-in-out;
    font-weight: bold;
    flex-grow: 1;
    text-align: right;
    width: 100%;
}

.dynamic-island.active .island-content {
    opacity: 1;
}

/* 图标样式（优先图片图标，否则 FontAwesome，避免外链图片失效） */
.dynamic-island .island-icon,
.dynamic-island .island-icon-img {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
}

.dynamic-island .island-icon {
    font-size: 18px;
    line-height: 1;
}

.dynamic-island .island-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* 悬停效果（只保留高度/圆角变化，取消图标放大以避免与文字重叠） */
.dynamic-island:hover {
    height: 60px;
    border-radius: 50px;
}

/* ===== 适配黑夜白天（body.dark-theme 为子比黑夜模式） ===== */
body.dark-theme .dynamic-island {
    background-color: #0a0a0a;
    color: #f2f2f2;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

body.dark-theme .dynamic-island .island-icon,
body.dark-theme .dynamic-island .island-icon-img {
    color: #f2f2f2;
}

/* 音频条形动画 */
.bars {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}

.bar {
    width: 2px;
    height: 13px;
    background-color: green;
    animation: bounce 1s infinite ease-in-out;
    animation-direction: alternate;
}

.bar:nth-child(1) { animation-duration: 1s; }
.bar:nth-child(2) { animation-duration: 0.9s; }
.bar:nth-child(3) { animation-duration: 0.8s; }
.bar:nth-child(4) { animation-duration: 0.7s; }
.bar:nth-child(5) { animation-duration: 0.6s; }
.bar:nth-child(6) { animation-duration: 0.9s; }
.bar:nth-child(7) { animation-duration: 0.7s; }

/* 弹跳动画关键帧 */
@keyframes bounce {
    0% {
        transform: scaleY(0.3);
        background-color: green;
    }
    50% {
        transform: scaleY(1);
        background-color: orange;
    }
    100% {
        transform: scaleY(0.3);
        background-color: green;
    }
}