/* 核心布局 - Split Screen */
:root {
    --split-speed: 1000ms;
    --hover-width: 65%;
    --other-width: 35%;
}

body {
    overflow: hidden;
    background: #000;
}

.split-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
}

.split {
    position: relative;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: width var(--split-speed) cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 左侧样式 */
.split.left {
    background: url('../assets/images/crychic_saki.png') center center no-repeat;
    background-size: cover;
}

.split.left .overlay {
    background: rgba(43, 85, 238, 0.4);
    mix-blend-mode: overlay;
    transition: opacity 0.5s ease;
}

.split.left:hover .overlay {
    background: rgba(43, 85, 238, 0.1);
}

/* 右侧样式 */
.split.right {
    background: url('../assets/images/bg.png') center center no-repeat;
    background-size: cover;
}

.split.right .overlay {
    background: rgba(0, 0, 0, 0.5);
    transition: opacity 0.5s ease;
}

.split.right:hover .overlay {
    opacity: 0.1;
}

/* 遮罩通用 */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* 内容通用 */
.content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    transition: transform 0.5s ease, opacity 0.5s ease;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    opacity: 0.8;
}

.split:hover .content {
    transform: scale(1.1);
    opacity: 1;
}

.title {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-select {
    padding: 15px 40px;
    border: 2px solid white;
    display: inline-block;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.split:hover .btn-select {
    background: white;
    color: black;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* 交互逻辑 */
.split-container:hover .split {
    width: var(--other-width);
}

.split-container .split:hover {
    width: var(--hover-width);
}

/* 中心 UI 层 */
.center-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.top-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    gap: 3rem;
    pointer-events: auto;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.nav-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-item:hover {
    color: white;
}

/* 底部播放器条 */
.bottom-player {
    pointer-events: auto;
    margin: 0 2rem 2rem 2rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: floatUp 1s ease-out;
    position: relative;
    overflow: hidden;
}

/* 进度条样式 */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.progress-container:hover {
    height: 5px;
}

.progress-bar {
    /* 改名为 progress-bar 以匹配 JS */
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.1s linear;
}

@keyframes floatUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.song-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
}

.song-info img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.song-info .text .name {
    font-size: 1rem;
    font-weight: bold;
    color: white;
}

.song-info .text .artist {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.controls button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.controls .play-main {
    width: 50px;
    height: 50px;
    background: white;
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.controls .play-main:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.search-trigger {
    display: flex;
    gap: 0.5rem;
}

.search-trigger input {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    color: white;
    outline: none;
    width: 150px;
    transition: width 0.3s;
}

.search-trigger input:focus {
    width: 250px;
    background: rgba(255, 255, 255, 0.2);
}

.search-trigger button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* 客服悬浮球 */
.chat-trigger {
    position: fixed;
    bottom: 120px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
    z-index: 100;
    transition: all 0.3s;
    animation: bounce 3s infinite ease-in-out;
}

.chat-trigger:hover {
    transform: scale(1.1) rotate(10deg);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* 客服对话框 */
.chat-modal {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.message.saki {
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.message.user {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
    }

    .split {
        width: 100% !important;
        height: 50%;
    }

    .title {
        font-size: 2.5rem;
    }

    .bottom-player {
        padding: 0.8rem;
        flex-direction: column;
        gap: 1rem;
        margin: 0 1rem 1rem 1rem;
        border-radius: 20px 20px 0 0;
        bottom: 0px;
    }

    .search-trigger input {
        width: 100%;
    }

    .chat-trigger {
        bottom: 180px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .center-ui {
        pointer-events: none;
    }

    .top-nav {
        padding: 1rem;
        gap: 1rem;
    }
}