/* css/style.css */
:root {
    --primary-color: #ff9a9e;
    --secondary-color: #fecfef;
    --bg-color: #1a1a2e;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --purple-border: #a842d9;
    --nav-height: 48px;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100dvh;
}
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}
#app {
    position: relative;
    width: 100vw;
    min-height: 100dvh;
    padding: var(--nav-height) 5px 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* 顶部导航栏 */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 9999;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-brand {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
}
.nav-links {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar {
    display: none;
}
.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 15px;
    transition: background 0.3s;
}
.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}
@media (max-width: 600px) {
    :root {
        --nav-height: 44px;
    }
    .main-nav {
        padding: 0 5px;
        height: var(--nav-height);
    }
    .nav-brand {
        font-size: 15px;
        margin-right: 5px;
    }
    .nav-links {
        gap: 2px;
        flex: 1;
        justify-content: flex-end;
    }
    .nav-links a {
        padding: 5px 6px;
        font-size: 12px;
    }
}
/* 左上角缩小在线统计 */
.top-bar {
    position: fixed;
    top: calc(var(--nav-height) + 8px);
    left: 8px;
    z-index: 9998;
    display: flex;
    gap: 6px;
    opacity: 0.95;
    pointer-events: auto;
}
.stats-item {
    background: rgba(0, 0, 0, 0.75);
    padding: 3px 8px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: normal;
    color: #fff;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
/* 视频容器 2px紫色边框 */
.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: auto;
    background: #000;
    z-index: 1;
    border: 2px solid var(--purple-border);
}
#player {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
/* 右下角按钮容器缩小 */
.right-actions {
    position: fixed;
    right: 8px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.75;
    z-index: 9999;
    pointer-events: auto;
}
/* 通用按钮缩小 */
.action-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    font-size: 14px;
    pointer-events: auto;
}
.action-btn:hover {
    transform: scale(1.12);
    background: rgba(255, 255, 255, 0.25);
}
/* 单独美化换视频按钮 */
.action-btn.next-btn {
    background: linear-gradient(135deg, rgba(255, 154, 158, 0.75) 0%, rgba(254, 207, 239, 0.75) 100%);
    box-shadow: 0 0 10px rgba(255, 154, 158, 0.4);
    border: 1px solid rgba(255, 200, 220, 0.5);
}
.action-btn.next-btn:hover {
    box-shadow: 0 0 16px rgba(255, 154, 158, 0.65);
}
.action-text {
    font-size: 8px;
    margin-top: 1px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.bottom-bar {
    bottom: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}
.primary-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    color: #333;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(10px);
}
.primary-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 154, 158, 0.8);
}
/* 自动播放开关同步缩小 */
.auto-play-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    cursor: pointer;
    pointer-events: auto;
}
.auto-play-toggle span.toggle-text {
    font-size: 8px;
    font-weight: normal;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}
.switch {
    position: relative;
    display: inline-block;
    width: 26px;
    height: 13px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(204, 204, 204, 0.5);
    transition: .4s;
    border-radius: 13px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 9px;
    width: 9px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: rgba(255, 154, 158, 0.7);
}
input:checked + .slider:before {
    transform: translateX(13px);
}
/* 点赞红心动画 */
.heart-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 80px;
    color: #ff4757;
    z-index: 10000;
    pointer-events: none;
    opacity: 1;
    animation: heartFade 2s ease-out forwards;
    text-shadow: 0 0 20px rgba(255, 71, 87, 0.8);
}
@keyframes heartFade {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    30% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}
/* 二次元 Toast 弹窗 */
.anime-toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.anime-toast {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-color);
    padding: 12px 25px;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(255, 154, 158, 0.4);
    color: #333;
    font-weight: bold;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, toastFadeOut 0.3s ease-out 2.7s forwards;
}
.anime-toast::before {
    content: "✨";
    font-size: 18px;
}
@keyframes toastSlideIn {
    from { transform: translateY(-50px) translateX(-50%); opacity: 0; }
    to { transform: translateY(0) translateX(-50%); opacity: 1; }
}
@keyframes toastFadeOut {
    from { transform: translateY(0) translateX(-50%); opacity: 1; }
    to { transform: translateY(-30px) translateX(-50%); opacity: 0; }
}
/* 加载动画样式 */
.loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px 50px;
    border-radius: 20px;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 30;
    min-width: 250px;
}
.loading-overlay p {
    margin-top: 20px;
    font-size: 16px;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    animation: pulse 1.5s infinite;
}
.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 154, 158, 0.3);
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
