/* 动态岛核心样式 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: 1000;
    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;
}

/* 图标样式 */
.dynamic-island img {
    position: absolute;
    left: 10px;
    width: 20px;
    height: 20px;
    object-fit: cover;
    transition: height 0.8s ease-in-out, width 0.8s ease-in-out, filter 0.8s ease-in-out;
}

/* 悬停效果 */
.dynamic-island:hover {
    height: 60px;
    border-radius: 50px;
}

.dynamic-island:hover img {
    width: 30px;
    height: 30px;
}

/* 音频条形动画 */
.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;
    }
}