/*
 * WanYesea子主题 - 前端样式
 * 各功能模块的静态CSS集中管理，动态值通过内联 :root CSS Variables 注入
 */

/* ===== 阅读进度条 ===== */
.reading-progress-bar {
    position: fixed;
    top: var(--wanyesea-progress-top, 0);
    bottom: var(--wanyesea-progress-bottom, auto);
    left: 0;
    width: 0;
    height: var(--wanyesea-progress-height, 3px);
    background: var(--wanyesea-progress-color, #425aef);
    z-index: 9999;
    transition: width 0.05s linear;
    pointer-events: none;
    box-shadow: 0 0 6px var(--wanyesea-progress-color-66, rgba(66, 90, 239, 0.4));
}
.reading-progress-percent {
    position: fixed;
    top: var(--wanyesea-percent-top, 3px);
    bottom: var(--wanyesea-percent-bottom, auto);
    right: 12px;
    z-index: 9999;
    font-size: 12px;
    color: var(--wanyesea-progress-color, #425aef);
    font-weight: 600;
    line-height: 1;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.reading-progress-percent.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Logo扫光 ===== */
.wanyesea-logo-searchlight .navbar-brand {
    position: relative;
    overflow: hidden;
    margin: 0px 0 0 0px;
}
.wanyesea-logo-searchlight .navbar-brand:before {
    content: "";
    position: absolute;
    left: -665px;
    top: -460px;
    width: 200px;
    height: 15px;
    background-color: rgba(255,255,255,.5);
    transform: rotate(-45deg);
    animation: wanyesea-searchLights 6s ease-in 0s infinite;
}
@keyframes wanyesea-searchLights {
    40% { left: -100px; top: 0; }
    60% { left: 120px; top: 100px; }
    80% { left: -100px; top: 0px; }
}

/* ===== 灵动岛 ===== */
.wanyesea-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: var(--wanyesea-island-bg, #000000);
    border-radius: 25px;
    color: var(--wanyesea-island-text, #ffffff);
    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);
}
.wanyesea-dynamic-island.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}
.wanyesea-dynamic-island.inactive {
    transform: translateX(-50%) scale(0);
    opacity: 0;
}
.wanyesea-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%;
}
.wanyesea-dynamic-island.active .wanyesea-island-content {
    opacity: 1;
}
.wanyesea-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;
}
.wanyesea-dynamic-island:hover {
    height: 60px;
    border-radius: 50px;
}
.wanyesea-dynamic-island:hover img {
    width: 30px;
    height: 30px;
}
.wanyesea-bars {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
}
.wanyesea-bar {
    width: 2px;
    height: 13px;
    background-color: var(--wanyesea-island-bar, #00ff00);
    animation: wanyesea-bounce 1s infinite ease-in-out;
    animation-direction: alternate;
}
.wanyesea-bar:nth-child(1) { animation-duration: 1s; }
.wanyesea-bar:nth-child(2) { animation-duration: 0.9s; }
.wanyesea-bar:nth-child(3) { animation-duration: 0.8s; }
.wanyesea-bar:nth-child(4) { animation-duration: 0.7s; }
.wanyesea-bar:nth-child(5) { animation-duration: 0.6s; }
.wanyesea-bar:nth-child(6) { animation-duration: 0.9s; }
.wanyesea-bar:nth-child(7) { animation-duration: 0.7s; }
@keyframes wanyesea-bounce {
    from { height: 5px; }
    to { height: 15px; }
}
