/* ============================== Tailwind 自定义工具类 ============================== */
@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    .text-shadow-lg {
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    }
    .backdrop-blur {
        backdrop-filter: blur(10px);
    }
    .transition-navbar {
        transition: all 0.3s ease;
    }
    .scrollbar-hide::-webkit-scrollbar {
        display: none;
    }
    .animate-shake {
        animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    }
}

/* ============================== 基础全局样式 ============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ============================== 动画关键帧定义 ============================== */
/* 渐入上移 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 旋转 */
@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

/* 脉冲缩放 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 抖动 */
@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-3px); }
    40%, 60% { transform: translateX(3px); }
}

/* 加载旋转（加载动画图标用） */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 骨架屏加载 */
@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 动画类应用 */
.animate-fadeInUp {
    animation: fadeInUp 1s ease forwards;
}

.animate-rotate {
    animation: rotate 2s linear infinite;
}

.animate-pulse-slow {
    animation: pulse 3s ease-in-out infinite;
}

/* ============================== 视频容器相关样式 ============================== */
/* 视频容器（16:9比例） */
.video-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 视频底部信息栏（视频外部下方） */
.video-info {
    max-width: 1200px;
    margin: -20px auto 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    color: #333;
}

/* 视频源信息布局 */
.video-source-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============================== 自定义滚动条 ============================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ff6600;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e55d00;
}

/* ============================== 加载动画（骨架屏） ============================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* ============================== 玩家评价轮播样式 ============================== */
.review-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.review-card {
    min-width: 100%;
    transition: opacity 0.5s ease-in-out;
}

/* ============================== 响应式适配补充 ============================== */
/* 确保移动端导航菜单样式生效（与JS交互配合） */
@media (max-width: 767px) {
    .nav-links.flex {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 4rem; /* 对应导航栏高度 */
        right: 0;
        width: 50%;
        height: calc(100vh - 4rem);
        background: rgba(26, 26, 26, 0.95);
        padding: 1.5rem;
        z-index: 40;
    }
}