/* css/style.css — 美热舞 v6.0 高级深色视觉升级 */
:root {
    --primary-color: #ff9a9e;
    --secondary-color: #fecfef;
    --bg-color: #0d0b1e;
    --bg-deep: #07060f;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.14);
    --purple: #a842d9;
    --cyan: #22d3ee;
    --pink: #f472b6;
    --nav-height: 52px;
    --shadow-glow: 0 0 24px rgba(168, 66, 217, 0.35);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
}
html, body {
    background: var(--bg-deep);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100dvh;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
::-webkit-scrollbar { width: 0; background: transparent; }

/* ============ 动态霓虹光斑背景 ============ */
.bg-aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(1200px 800px at 80% -10%, rgba(168, 66, 217, 0.22), transparent 60%),
        radial-gradient(1000px 700px at -10% 110%, rgba(34, 211, 238, 0.16), transparent 55%),
        radial-gradient(900px 600px at 110% 60%, rgba(244, 114, 182, 0.14), transparent 55%),
        linear-gradient(160deg, #0d0b1e 0%, #141230 55%, #0b0a1f 100%);
}
.bg-aurora i { position: absolute; display: block; border-radius: 50%; filter: blur(70px); opacity: 0.55; }
.aurora-1 {
    width: 46vw; height: 46vw; left: -10vw; top: -8vw;
    background: radial-gradient(circle, rgba(168, 66, 217, 0.5), transparent 70%);
    animation: drift1 16s ease-in-out infinite alternate;
}
.aurora-2 {
    width: 40vw; height: 40vw; right: -8vw; top: 24vh;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.4), transparent 70%);
    animation: drift2 20s ease-in-out infinite alternate;
}
.aurora-3 {
    width: 34vw; height: 34vw; left: 24vw; bottom: -12vh;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.38), transparent 70%);
    animation: drift3 18s ease-in-out infinite alternate;
}
.aurora-grid {
    inset: 0; border-radius: 0; filter: none;
    background:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.85), transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.85), transparent 75%);
}
@keyframes drift1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8vw, 6vh) scale(1.18); }
}
@keyframes drift2 {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-6vw, -8vh) scale(0.9); }
}
@keyframes drift3 {
    0% { transform: translate(0, 0) scale(0.95); }
    100% { transform: translate(4vw, -6vh) scale(1.12); }
}

/* ============ 顶部导航栏（毛玻璃高级版） ============ */
.main-nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--nav-height);
    background: linear-gradient(180deg, rgba(13, 11, 30, 0.82), rgba(13, 11, 30, 0.55));
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 9999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.main-nav::after {
    content: "";
    position: absolute;
    left: 8%; right: 8%; bottom: -1px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 66, 217, 0.55), rgba(34, 211, 238, 0.55), transparent);
    pointer-events: none;
}
.nav-brand {
    font-size: 21px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.5px;
    background: linear-gradient(120deg, #ff9a9e 0%, #fecfef 40%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(255, 154, 158, 0.45));
    animation: brandFloat 3.5s ease-in-out infinite;
}
@keyframes brandFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1.5px); }
}
.nav-links {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 13.5px;
    padding: 7px 14px;
    border-radius: 18px;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}
.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 154, 158, 0.35);
    box-shadow: 0 0 14px rgba(255, 154, 158, 0.25);
}
.nav-links a[style*="0.2"], .nav-links a:active {
    background: linear-gradient(120deg, rgba(255, 154, 158, 0.28), rgba(167, 139, 250, 0.28));
    border-color: rgba(255, 154, 158, 0.4);
    color: #fff;
}
.nav-links a.nav-cta {
    background: linear-gradient(120deg, rgba(255, 154, 158, 0.22), rgba(167, 139, 250, 0.22));
    border: 1px solid rgba(255, 154, 158, 0.5);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 14px rgba(255, 154, 158, 0.3);
    white-space: nowrap;
}
.nav-links a.nav-cta:hover {
    background: linear-gradient(120deg, rgba(255, 154, 158, 0.4), rgba(167, 139, 250, 0.4));
    box-shadow: 0 0 20px rgba(255, 154, 158, 0.55);
}
@media (max-width: 600px) {
    :root { --nav-height: 48px; }
    .main-nav { padding: 0 8px; }
    .nav-brand { font-size: 16px; }
    .nav-links { gap: 4px; flex: 1; justify-content: flex-end; }
    .nav-links a { padding: 6px 8px; font-size: 12px; }
}

/* ============ 左上角在线统计（发光胶囊） ============ */
.top-bar {
    position: fixed;
    top: calc(var(--nav-height) + 10px);
    left: 10px;
    z-index: 9998;
    display: flex;
    gap: 8px;
    opacity: 0.98;
    pointer-events: auto;
}
.stats-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.09);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.04);
    letter-spacing: 0.3px;
}
.live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.9);
    animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.72); }
}

/* ============ 主舞台（全屏） ============ */
#app {
    position: relative;
    z-index: 1;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
}

/* 视频包装层（顶部栏下方全屏，保留原始比例） */
.video-wrap {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100dvh - var(--nav-height));
    background: #000;
}
.video-wrap { will-change: transform; }
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    z-index: 1;
}
#player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

/* 首次打开：透明播放按钮层（不挡视频手势，点击解锁声音） */
.start-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;         /* 背景不拦截视频滑动/点赞 */
    transition: opacity 0.4s ease;
}
.start-overlay.hidden {
    opacity: 0;
}
.start-play-btn {
    pointer-events: auto;          /* 仅按钮可点击 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 0 32px rgba(255, 154, 158, 0.35), inset 0 0 18px rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.start-play-btn:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.24);
    box-shadow: 0 0 42px rgba(255, 154, 158, 0.55), inset 0 0 18px rgba(255, 255, 255, 0.08);
}
.start-play-icon {
    font-size: 46px;
    line-height: 1;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.5);
    transform: translateX(2px);
}
.start-play-tip {
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.92);
}

/* ============ 右侧按钮组 ============ */
.right-actions {
    position: fixed;
    right: 12px;
    bottom: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    pointer-events: auto;
}
.action-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s, box-shadow 0.25s, border-color 0.25s;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}
.action-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 55%);
    pointer-events: none;
}
.action-btn:hover {
    transform: scale(1.1) translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), 0 0 18px rgba(168, 66, 217, 0.4);
}
.action-btn:active { transform: scale(0.94); }
.action-icon { font-size: 20px; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
.action-text {
    font-size: 9px;
    margin-top: 3px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
/* 下一个：粉色渐变发光 */
.next-btn {
    background: linear-gradient(135deg, rgba(255, 110, 130, 0.85), rgba(244, 114, 182, 0.85));
    border-color: rgba(255, 170, 190, 0.6);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 22px rgba(255, 154, 158, 0.5);
}
.next-btn:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 30px rgba(255, 154, 158, 0.75); }
/* 点赞：红色渐变 */
.like-btn {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.9), rgba(255, 105, 135, 0.9));
    border-color: rgba(255, 130, 150, 0.6);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 20px rgba(244, 63, 94, 0.5);
}
.like-btn:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 30px rgba(244, 63, 94, 0.8); }
/* 我的：蓝紫渐变 */
.mine-btn {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(168, 85, 247, 0.9));
    border-color: rgba(170, 160, 255, 0.6);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 20px rgba(99, 102, 241, 0.5);
}
.mine-btn:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 30px rgba(99, 102, 241, 0.8); }
/* 下载：青绿渐变 */
.dl-btn {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.9), rgba(34, 211, 238, 0.9));
    border-color: rgba(110, 230, 220, 0.6);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 20px rgba(45, 212, 191, 0.5);
}
.dl-btn:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 30px rgba(45, 212, 191, 0.8); }

/* 自动播放开关 */
.auto-play-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.09);
    padding: 7px 8px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: border-color 0.25s, box-shadow 0.25s;
}
.auto-play-toggle:hover { border-color: rgba(255, 154, 158, 0.45); box-shadow: 0 8px 24px rgba(0,0,0,0.45), 0 0 16px rgba(168, 66, 217, 0.3); }
.auto-play-toggle span.toggle-text {
    font-size: 9px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.switch { position: relative; display: inline-block; width: 30px; height: 16px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(120, 120, 140, 0.45);
    transition: 0.35s ease;
    border-radius: 16px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}
.slider:before {
    position: absolute; content: "";
    height: 12px; width: 12px;
    left: 2px; bottom: 2px;
    background: #fff;
    transition: 0.35s ease;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
input:checked + .slider {
    background: linear-gradient(90deg, #ff9a9e, #a78bfa);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3), 0 0 10px rgba(255, 154, 158, 0.5);
}
input:checked + .slider:before { transform: translateX(14px); }

/* 底部悬浮提示条 */
.page-hint {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    padding: 8px 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    letter-spacing: 0.5px;
    z-index: 9997;
    pointer-events: none;
}
.page-hint i { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.4); }

/* ============ 点赞红心动画（高级发光） ============ */
.heart-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 92px;
    color: #ff4d6d;
    z-index: 10000;
    pointer-events: none;
    opacity: 1;
    animation: heartFade 2s ease-out forwards;
    text-shadow: 0 0 30px rgba(255, 77, 109, 0.9), 0 0 60px rgba(255, 77, 109, 0.5);
    filter: drop-shadow(0 0 24px rgba(255, 77, 109, 0.7));
}
@keyframes heartFade {
    0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    18%  { transform: translate(-50%, -50%) scale(1.35); opacity: 1; }
    30%  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    70%  { transform: translate(-50%, -50%) scale(1.25); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(2.1); opacity: 0; }
}

/* ============ Toast（玻璃拟态深色版） ============ */
.anime-toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.anime-toast {
    background: rgba(20, 16, 40, 0.85);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255, 154, 158, 0.45);
    padding: 12px 26px;
    border-radius: 28px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 66, 217, 0.25);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, toastFadeOut 0.35s ease-out 2.6s forwards;
}
.anime-toast::before {
    content: "✨";
    font-size: 17px;
    filter: drop-shadow(0 0 6px rgba(255, 154, 158, 0.8));
}
@keyframes toastSlideIn {
    from { transform: translateY(-60px) 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(-26px) translateX(-50%); opacity: 0; }
}

/* ============ 加载动画（双层霓虹） ============ */
.loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 34px 52px;
    border-radius: 24px;
    background: rgba(13, 11, 30, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(168, 66, 217, 0.35);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.6), 0 0 34px rgba(168, 66, 217, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 30;
    min-width: 270px;
}
.loading-overlay p {
    margin-top: 22px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.spinner {
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, #ff9a9e 35%, #a78bfa 65%, #22d3ee 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
    animation: spin 0.9s linear infinite;
    filter: drop-shadow(0 0 12px rgba(168, 66, 217, 0.6));
}
.spinner-inner {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(34, 211, 238, 0.7);
    animation: spin 1.2s linear infinite reverse;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-text { animation: loadingPulse 1.6s ease-in-out infinite; }
@keyframes loadingPulse {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 1; }
}
.loading-dots i { font-style: normal; animation: dotJump 1.2s ease-in-out infinite; display: inline-block; }
.loading-dots i:nth-child(2) { animation-delay: 0.2s; }
.loading-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotJump {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-4px); opacity: 1; }
}

/* ============ 兼容旧类（其他页面） ============ */
.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);
}
