/* ============================================
   配色规范（Color Scheme）
   ============================================
   背景色：#000000  纯黑
   大文字：#f5f5f5  浅灰白（标题、影片名）
   小文字：#999999  中灰（年份、评分、简介）
   ============================================ */

/* 全局基础样式 */
html, body {
    background-color: #000000;
    color: #f5f5f5;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

/* 导航栏样式 */
#main-header {
    backdrop-filter: blur(10px);
    max-width: 100vw;
    overflow-x: hidden;
}

/* 汉堡菜单图标旋转动画 */
#hamburger-icon {
    transition: transform 0.4s ease;
}

/* 主内容容器滑动动画 */
#main-content {
    transition: transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
    max-width: 100vw;
    overflow-x: hidden;
}

/* 防止页面出现横向滚动条 */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* 汉堡菜单全屏页面 */
#hamburger-menu {
    transition: transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
    max-width: 100vw;
}

/* 汉堡菜单内容容器 */
#hamburger-menu .menu-item {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* 导航栏按钮悬停效果 */
.nav-btn:hover {
    background-color: #1a1a1a;
}

/* 汉堡菜单项悬停效果 */
#hamburger-menu .menu-item:hover {
    background-color: #1a1a1a;
}

/* 搜索框聚焦样式 - 细边框 1px */
#search-input:focus,
#search-input-mobile:focus {
    border-color: #3bbfab !important;
    border-width: 1px !important;
}

/* 移除搜索框自动填充的白色背景 */
#search-input:-webkit-autofill,
#search-input:-webkit-autofill:hover,
#search-input:-webkit-autofill:focus,
#search-input-mobile:-webkit-autofill,
#search-input-mobile:-webkit-autofill:hover,
#search-input-mobile:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1a1a1a inset !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* 移除搜索框自动完成下拉的白色背景 */
input[type="text"]:-webkit-autofill,
input[type="text"]:-webkit-autofill:hover,
input[type="text"]:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1a1a1a inset !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    background-color: #1a1a1a !important;
}


/* 移动端搜索面板动画 */
#mobile-search-panel {
    transition: transform 0.4s ease;
    will-change: transform;
}

/* 标题颜色 */
h1, h2, h3, h4, h5, h6 {
    color: #f5f5f5;
}

/* 辅助文字颜色 */
.text-secondary {
    color: #999999;
}

/* 视频卡片样式 */
.vod-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 手机端和iPad：禁用悬停上移动画 */
@media (max-width: 1023px) {
    .vod-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* PC端：保留悬停上移动画 */
@media (min-width: 1024px) {
    .vod-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
}

/* 封面图片样式 */
.vod-pic {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 (9/16 = 0.5625) */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* 视频时长样式 */
.vod-duration {
    font-weight: 500;
    z-index: 10;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 6px rgba(0, 0, 0, 0.5);
}

/* 播放器容器 */
.player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    height: 0;
    overflow: hidden;
}

/* 弹窗遮罩 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: none;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 弹窗内容 */
.modal-content {
    background: #1a1a1a;
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    z-index: 9999;
    position: relative;
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: none;
    animation: slideIn 0.3s ease;
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式网格调整 */
@media (max-width: 640px) {
    .vod-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .vod-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1025px) {
    .vod-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* ============================================
   弹窗样式（MAC.Pop.Show 使用）
   ============================================ */

/* 弹窗遮罩层 */
.mac_pop_bg {
    position: fixed !important;
    z-index: 99998 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0) !important;
    backdrop-filter: blur(2px);
    display: block !important;
    opacity: 0;
    transition: opacity 0.45s ease, background 0.45s ease;
}

/* 遮罩淡入 */
.mac_pop_bg.pop-fade-in {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.7) !important;
}

/* 弹窗容器 - 居中显示 */
.mac_pop {
    z-index: 99999 !important;
    display: none;
    min-height: 20px;
    max-height: 90vh;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -65%) !important;
    margin: 0 !important;
    padding: 0;
    border-radius: 12px;
    background-color: #000000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    max-width: 90%;
    width: 400px;
    opacity: 0;
    transition: opacity 0.45s ease;
}

/* PC端弹窗位置调整 */
@media (min-width: 1024px) {
    .mac_pop {
        transform: translate(-50%, -85%) !important;
    }
}

.mac_pop[style*="display"] {
    display: block !important;
}

/* 弹窗淡入 */
.mac_pop.pop-fade-in {
    opacity: 1 !important;
}

/* 弹窗淡出 */
.mac_pop.pop-fade-out {
    opacity: 0 !important;
}

/* 弹窗标题栏 */
.mac_pop .pop_top {
    height: 50px;
    width: 100%;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background-color: #000000;
}

.mac_pop .pop_top h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #f5f5f5;
}

/* 关闭按钮 */
.mac_pop .pop_close {
    width: 32px;
    height: 32px;
    font-size: 24px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    color: #f5f5f5;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mac_pop .pop_close:hover {
    background-color: #1a1a1a;
}

/* 弹窗内容区域 */
.mac_pop .pop_content {
    padding: 24px;
    background-color: #000000;
    color: #f5f5f5;
    max-height: calc(90vh - 50px);
    overflow-y: auto;
}

/* 登录表单样式优化 */
.mac_login {
    background-color: #000000;
    color: #f5f5f5;
}

.mac_login .mac_login_form {
    width: 100%;
}

/* 验证码输入组样式 */
.mac_login .login_form_group {
    min-width: 0; /* 防止 flex 子元素溢出 */
}

.mac_login .mac_u_verify {
    min-width: 0; /* 允许输入框缩小 */
}

.mac_login .mac_verify_img,
.mac_verify_img {
    flex-shrink: 0;
    width: 100px !important;
    max-width: 100px !important;
    height: 48px !important;
    object-fit: contain;
    background-color: #f4fbfe !important;
}

/* 注册表单样式 */
.reg_form_group {
    min-width: 0; /* 防止 flex 子元素溢出 */
}

/* 响应式调整 */
@media (max-width: 640px) {
    .mac_pop {
        width: 95%;
        max-width: 95%;
    }
    
    .mac_pop .pop_content {
        padding: 20px;
    }
}

/* ============================================
   分类板块样式
   ============================================ */

.category-swiper {
    width: 100%;
    padding: 12px 0 8px 0;
    overflow: hidden;
    position: relative;
}

.category-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.category-swiper .swiper-slide {
    width: auto;
    height: auto;
    flex-shrink: 0;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 65px;
    cursor: pointer;
}

.category-thumb {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 8px;
}

.category-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    border-radius: 50%;
}

.category-all-border {
    border: 2px solid rgba(245, 245, 245, 0.5);
    box-sizing: border-box;
}

.category-label {
    font-size: 11px;
    text-align: center;
    line-height: 1.4;
    word-break: break-all;
    max-width: 65px;
    margin: 0;
    padding: 4px 0 0 0;
    color: #f5f5f5;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式调整 */
@media (min-width: 640px) {
    .category-item {
        width: 80px;
    }
    
    .category-thumb {
        width: 80px;
        height: 80px;
    }
    
    .category-label {
        font-size: 12px;
        max-width: 80px;
        padding: 6px 0 0 0;
    }
}

/* PC端：保留悬停上移动画 */
@media (min-width: 1024px) {
    .category-item {
        width: 90px;
        transition: transform 0.3s ease;
    }
    
    .category-item:hover {
        transform: translateY(-4px);
    }
    
    .category-thumb {
        width: 85px;
        height: 85px;
    }
    
    .category-label {
        font-size: 13px;
        max-width: 90px;
        padding: 8px 0 0 0;
    }
}

/* 箭头图标悬停动画 */
.arrow-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

a:hover .arrow-icon {
    transform: translateX(4px);
}

/* 收藏按钮样式 */
.collect-btn {
    position: relative;
}

.collect-btn i {
    transition: color 0.3s ease, display 0.3s ease;
}

/* 默认状态：显示空心图标，隐藏实心图标 */
.collect-btn:not(.collected) i.ri-heart-3-line {
    display: inline-block;
    color: inherit;
}

.collect-btn:not(.collected) i.ri-heart-3-fill {
    display: none;
}

/* 悬停时：隐藏空心图标，显示实心图标并变红 */
.collect-btn:not(.collected):hover i.ri-heart-3-line {
    display: none;
}

.collect-btn:not(.collected):hover i.ri-heart-3-fill {
    display: inline-block !important;
    color: #ef4444 !important;
}

/* 已收藏状态 - 图标保持红色实心 */
.collect-btn.collected i.ri-heart-3-line {
    display: none;
}

.collect-btn.collected i.ri-heart-3-fill {
    display: inline-block !important;
    color: #ef4444 !important;
}

/* ============================================
   地区分类卡片样式
   ============================================ */

.category-card {
    position: relative;
    width: 100%;
    padding-bottom: 133.33%; /* 3:4 比例 (4/3 = 1.333) */
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
}

.category-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* PC端：保留悬停上移动画 */
@media (min-width: 1024px) {
    .category-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .category-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
}

/* ============================================
   视频列表响应式显示控制
   ============================================ */

/* 播放页「猜你喜欢」板块：默认隐藏第7和第8个视频 */
.guess-like-extra {
    display: none;
}

/* 在768px-1023px之间显示第7和第8个视频（显示8个） */
@media (min-width: 768px) and (max-width: 1023px) {
    .guess-like-extra {
        display: block;
    }
}

/* 首页视频板块：PC端（lg，1024px以上）隐藏第11和第12个视频，显示10个 */
.index-extra {
    display: block;
}

@media (min-width: 1024px) {
    .index-extra {
        display: none;
    }
}

