/**
 * layout.css
 * ================================================
 * 页面布局和卡片样式定义文件
 * ------------------------------------------------
 * 功能说明：
 * 1. 定义页面全局布局和过渡效果
 * 2. 实现游戏卡片的视觉设计和交互动画
 * 3. 设计侧边栏和推荐游戏区域
 * 4. 定义隐私政策页面专用样式
 * 5. 实现响应式布局适配
 * 
 * 样式组织：
 * - 页面过渡 (.page-loading-indicator, main)
 * - 游戏卡片 (.game-card, .game-preview, .game-hover-title)
 * - 卡片标识 (.featured-badge, .current-game-marker)
 * - 侧边栏 (.games-sidebar)
 * - 隐私页面 (.privacy-policy-container)
 * - 响应式样式 (@media queries)
 * 
 * 交互特性：
 * - 卡片悬停效果（缩放、视频播放）
 * - 页面加载进度指示器
 * - 游戏标识徽章显示
 * 
 * 注意事项：
 * - 游戏内容区域样式已迁移至 game-content.css
 * - 保持与其他模块的视觉一致性
 * 
 * 版本: 1.0.4
 * 最后更新: 2025-01-XX
 */

/* 页面加载指示器样式 */
.page-loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    z-index: 1001; /* 确保在固定导航条(z-index: 1000)之上 */
    transition: width 0.3s ease-out, opacity 0.3s ease;
}

/* 为固定导航条预留顶部间距，所有内容区块禁止再设置 margin-top/padding-top */
body {
    padding-top: calc(40px + 1.5rem);
}

/* 内容过渡效果 */
main {
    transition: opacity 0.3s ease;
}

/* 游戏卡片样式 */
.game-card {
    --card-shadow: 0 0 #0000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.game-card a {
    position: relative;
    display: block;
    text-decoration: none;
}

/* 游戏卡片的停悬边框样式：需要在JSfunction addTransitionStyles()中修改 */
.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow), 0 0 0 1px #d6fe51;
}

.game-preview {
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #111827;
    position: relative !important; /* 强制相对定位 */
}

.game-preview img, .game-preview video {
    transition: transform 0.3s ease;
    width: 100%;
    display: block;
}

.game-card:hover .game-preview img,
.game-card:hover .game-preview video {
    transform: scale(1.05);
}

/* 视频相关样式 */
.game-preview video {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-preview video {
    opacity: 1;
}

/* 游戏标题样式 */
.game-card-title {
    color: #a0aec0;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 0.5rem;
    padding: 0 0.5rem;
    text-align: center;
    font-family: 'Nunito', sans-serif;
}

.game-card:hover .game-card-title {
    color: #f5f5f7;
}

/* 悬停时显示的游戏名称 */
.game-hover-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0));
    color: white;
    padding: 20px 10px 10px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    font-family: 'Nunito', sans-serif;
}

.game-card:hover .game-hover-title {
    opacity: 1;
}

/* 游戏标识样式 */
.featured-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 0 0 8px 0; /* 只有右下角是圆角 */
    background-color: #ff6b2b; /* 橙色背景 */
    color: white; /* 白色文字 */
    font-size: 0.85rem;
    font-weight: bold;
    position: absolute;
    top: 0;
    left: 0;
    text-transform: uppercase; /* 文本转为大写 */
    z-index: 20; /* 增加z-index确保在最上层 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-family: 'Nunito', sans-serif;
    line-height: 1;
    pointer-events: none; /* 确保标识不会阻碍点击 */
}

/* 在游戏卡片中的位置 */
.game-card .featured-badge {
    /* 重置之前的transform */
    transform: none;
}

/* 游戏悬停标题中不再需要特殊处理标识 */
.game-hover-title .featured-badge {
    display: none; /* 隐藏标题中的标识，只保留左上角的标识 */
}

/* 标记当前游戏样式 */
.current-game-marker {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #ff4757;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
    font-weight: bold;
}

/* 信息区块布局 - 已迁移到 game-content.css */

/* 通用文本区域样式 - 游戏内容区域样式已迁移到 game-content.css */
.prose {
    max-width: none;
    overflow: visible;
    min-height: fit-content;
    height: auto;
    color: #a0aec0;
    font-weight: 400;
}

/* 通用游戏视频容器 - 游戏内容区域专用样式已迁移到 game-content.css */

/* 游戏侧边栏 */
.games-sidebar {
    padding: 1.5rem;
    background-color: rgba(45, 45, 45, 1);
    backdrop-filter: blur(8px);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.games-sidebar .space-y-6 {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Add smaller gap between game cards */
}

.games-sidebar .game-card {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .games-sidebar {
        margin-top: 2rem;
    }
}

/* Privacy Policy页面样式 */
.privacy-policy-page {
    /* 移除额外的padding-top，依赖main标签的pt-6设置 */
    padding-bottom: 1.5rem;
}

.privacy-policy-container {
    /* 使用与Game How to play区域相同的背景样式 */
    background-color: rgba(45, 45, 45, 1);
    backdrop-filter: blur(8px);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.privacy-policy-container h1 {
    /* Privacy Policy标题样式 */
    font-family: 'Nunito', sans-serif;
    color: #f5f5f7;
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.privacy-policy-container .prose {
    /* 与Game How to play区域正文样式保持一致 */
    max-width: none;
    overflow: visible;
    min-height: fit-content;
    height: auto;
    color: #a0aec0;
    font-weight: 400;
}

.privacy-policy-container .prose h3 {
    /* H3标题样式 */
    color: #f5f5f7;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.privacy-policy-container .prose p {
    /* 段落样式 */
    color: #a0aec0;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.privacy-policy-container .prose ul {
    /* 列表样式 */
    color: #a0aec0;
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.privacy-policy-container .prose li {
    /* 列表项样式 */
    margin-bottom: 0.5rem;
}

.privacy-policy-container .prose a {
    /* 链接样式 */
    color: #a0aec0;
    text-decoration: underline;
}

.privacy-policy-container .prose a:hover {
    /* 链接悬停样式 */
    color: #3b82f6;
}

.privacy-policy-container .prose strong {
    /* 粗体文本样式 */
    color: #f5f5f7;
    font-weight: 600;
}

/* Privacy Policy分割线样式 */
.privacy-policy-separator {
    height: 0.5px;
    margin: 1.5rem 0;
    width: 100%;
    
    /* 渐变边框效果，参考footer样式 */
    background: linear-gradient(
        90deg, 
        rgba(63, 65, 92, 0.8) 0%,
        rgba(63, 65, 92, 0.4) 50%,
        rgba(63, 65, 92, 0.8) 100%
    );
    
    /* 添加轻微的阴影增强立体感 */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    
    /* 圆角处理 */
    border-radius: 1px;
    border: none;
}