/* ===== 全局样式 ===== */

/* 链接样式 */
.video-link, .actor-link {
    text-decoration: none !important;
    display: block;
}

.video-link:hover, .actor-link:hover {
    text-decoration: none !important;
}

.video-link:hover .video-title {
    color: #CE1141 !important;
}

.video-link:hover .video-title strong {
    color: #CE1141 !important;
}

.actor-link:hover .actor-name {
    color: #a00d33 !important;
}

.actor-link:hover .actor-name strong {
    color: #CE1141 !important;
}

/* 视频标题固定高度 */
.video-title {
    min-height: 38px;
}

/* ===== 收藏按钮样式 ===== */
.favorite-btn-small {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute;
    top: 10px;
    right: 20px;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.3s;
}

.favorite-btn-small i {
    margin: 0 !important;
    line-height: 1 !important;
}

.favorite-btn-small:hover {
    background: rgba(0,0,0,0.8);
}

/* 手机版收藏按钮优化 */
@media (max-width: 768px) {
    .favorite-btn-small {
        top: 8px;
        right: 18px;
        width: 32px;
        height: 32px;
    }

    .favorite-btn-small i {
        font-size: 16px !important;
    }
}

/* 小屏手机收藏按钮优化 */
@media (max-width: 480px) {
    .favorite-btn-small {
        top: 6px;
        right: 16px;
        width: 30px;
        height: 30px;
    }

    .favorite-btn-small i {
        font-size: 14px !important;
    }
}

/* ===== 女優收藏按钮样式 ===== */
.actor-favorite-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute;
    top: 10px;
    right: 20px;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.3s;
}

.actor-favorite-btn i {
    margin: 0 !important;
    line-height: 1 !important;
}

.actor-favorite-btn:hover {
    background: rgba(0,0,0,0.8);
}

/* 手机版收藏按钮优化 */
@media (max-width: 768px) {
    .actor-favorite-btn {
        top: 8px;
        right: 18px;
        width: 32px;
        height: 32px;
    }

    .actor-favorite-btn i {
        font-size: 16px !important;
    }
}

/* 小屏手机收藏按钮优化 */
@media (max-width: 480px) {
    .actor-favorite-btn {
        top: 6px;
        right: 16px;
        width: 30px;
        height: 30px;
    }

    .actor-favorite-btn i {
        font-size: 14px !important;
    }
}

/* ===== VideoJS 播放器样式 ===== */
#videoplayerholder,
.video-player-container {
    height: 500px !important;
}

.video-js {
    width: 100% !important;
    height: 500px !important;
}

.video-js .vjs-tech {
    width: 100% !important;
    height: 500px !important;
}

/* 手机版播放器高度优化 */
@media (max-width: 768px) {
    #videoplayerholder,
    .video-player-container {
        height: 270px !important;
    }

    .video-js {
        height: 270px !important;
    }

    .video-js .vjs-tech {
        height: 270px !important;
    }

    /* 播放器内部元素也需要适配 */
    .videoplayerstartbtn {
        height: 100% !important;
    }

    #videoplayerplaceholder {
        height: 100% !important;
    }
}

/* ===== Modal 样式 ===== */

/* 403 错误 Modal */
#trailer403Modal .modal-footer .btn:hover {
    background-color: #a80f34 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(206, 17, 65, 0.3);
}

#trailer403Modal .close:hover {
    opacity: 0.8 !important;
}

/* 图片 Modal 优化 */
#myModalImg.modal.fade .modal-dialog {
    -webkit-transition: transform 0.1s ease-out !important;
    -moz-transition: transform 0.1s ease-out !important;
    -o-transition: transform 0.1s ease-out !important;
    transition: transform 0.1s ease-out !important;
}

#myModalImg.modal.fade {
    -webkit-transition: opacity 0.1s linear !important;
    -moz-transition: opacity 0.1s linear !important;
    -o-transition: opacity 0.1s linear !important;
    transition: opacity 0.1s linear !important;
}

/* 轮播图图片响应式居中显示 */
#myModalImg .carousel-inner .item {
    opacity: 1 !important;
    text-align: center;
    min-height: 400px;
    background-color: #f5f5f5;
}

#myModalImg .carousel-inner .item.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

#myModalImg .carousel-inner .item img {
    max-width: 100%;
    max-height: 600px;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    #myModalImg .carousel-inner .item {
        min-height: 300px;
    }
    #myModalImg .carousel-inner .item img {
        max-height: 400px;
    }
}

/* 登录模态框样式 */
#myModalLogin .panel-heading {
    color: white !important;
}

#myModalLogin .form-control:focus {
    border-color: #CE1141;
    box-shadow: 0 0 0 2px rgba(206, 17, 65, 0.2);
}

#myModalLogin .alert {
    border-radius: 6px;
}

#myModalLogin .panel-body {
    background-color: white;
}

/* 注册模态框样式 */
#myModalLogin .div-to-register .panel-heading {
    color: white !important;
}

#myModalLogin .div-to-register .form-control:focus {
    border-color: #5cb85c;
    box-shadow: 0 0 0 2px rgba(92, 184, 92, 0.2);
}

#myModalLogin .div-to-register .alert {
    border-radius: 6px;
}

#myModalLogin .div-to-register .panel-body {
    background-color: white;
}

/* ===== 收藏页面样式 ===== */
.folder-list-item:hover {
    background-color: #e8e8e8 !important;
}

.folder-list-item.active:hover {
    background-color: #a50024 !important;
}

/* ===== 滚动条样式 ===== */
.x-scroll {
    scrollbar-color: #999 #fff;  /* thumb 颜色 + 轨道颜色 */
}

/* Webkit 浏览器滚动条 */
.x-scroll::-webkit-scrollbar {
    height: 8px;
}

.x-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.x-scroll::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 4px;
}

.x-scroll::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* ===== 认证页面样式 ===== */
.panel {
    transition: all 0.3s ease;
}

.panel:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
}

.panel-heading {
    color: white !important;
}

.form-control:focus {
    border-color: #CE1141;
    box-shadow: 0 0 0 2px rgba(206, 17, 65, 0.2);
}

.form-control[readonly] {
    background-color: #f5f5f5 !important;
    cursor: not-allowed;
    opacity: 0.8;
}

.alert {
    border-radius: 6px;
}

.panel-body {
    background-color: white;
}

/* 注册页面特殊样式 */
.register-form .form-control:focus {
    border-color: #5cb85c;
    box-shadow: 0 0 0 2px rgba(92, 184, 92, 0.2);
}

/* ===== 登录按钮样式 ===== */

/* 手机版菜单中的登录链接 */
.dropdown-menu .loginlink {
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border-radius: 0 !important;
    top: auto !important;
    right: auto !important;
}

.dropdown-menu .loginlink a {
    display: block !important;
    padding: 3px 20px !important;
    clear: both !important;
    font-weight: normal !important;
    line-height: 1.42857143 !important;
    color: #333 !important;
    white-space: nowrap !important;
}

.dropdown-menu .loginlink a:hover {
    color: #262626 !important;
    text-decoration: none !important;
    background-color: #f5f5f5 !important;
}

/* 圆形收藏按钮样式的登录按钮（用于视频卡片） */
.loginlink:not(.btn):not(.dropdown-menu .loginlink) {
    position: absolute;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
    top: 10px;
    right: 20px;
}

.loginlink:not(.btn):not(.dropdown-menu .loginlink):hover {
    background: rgba(0,0,0,0.8);
}

.loginlink:not(.btn):not(.dropdown-menu .loginlink) i {
    margin: 0 !important;
    line-height: 1 !important;
    color: white;
    font-size: 18px;
}

/* 普通按钮样式的登录按钮 */
.loginlink.btn {
    position: static !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    border-radius: 4px !important;
    padding: 6px 12px !important;
}

.loginlink.btn-default {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    color: #495057 !important;
}

.loginlink.btn-default:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
}

.loginlink.btn-primary {
    background: #CE1141 !important;
    border: 1px solid #CE1141 !important;
    color: white !important;
}

.loginlink.btn-primary:hover {
    background: #a80f34 !important;
    border-color: #a80f34 !important;
}

.loginlink.btn-link {
    background: transparent !important;
    border: none !important;
    color: #CE1141 !important;
    text-decoration: none !important;
}

.loginlink.btn-link:hover {
    color: #a80f34 !important;
    text-decoration: underline !important;
}

/* 手机版圆形按钮优化 */
@media (max-width: 768px) {
    .loginlink:not(.btn):not(.dropdown-menu .loginlink) {
        top: 8px;
        right: 18px;
        width: 32px;
        height: 32px;
    }

    .loginlink:not(.btn):not(.dropdown-menu .loginlink) i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .loginlink:not(.btn):not(.dropdown-menu .loginlink) {
        top: 6px;
        right: 16px;
        width: 30px;
        height: 30px;
    }

    .loginlink:not(.btn):not(.dropdown-menu .loginlink) i {
        font-size: 14px;
    }
}

/* ===== 响应式优化 ===== */
@media (max-width: 768px) {
    /* 移动端优化 */
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* 认证页面响应式 */
    .col-md-4.col-md-offset-4,
    .col-md-6.col-md-offset-3,
    .col-md-8.col-md-offset-2,
    .col-md-10.col-md-offset-1 {
        width: 100%;
        margin-left: 0;
        padding: 0 15px;
    }

    .panel-body {
        padding: 20px !important;
    }
}

@media (max-width: 480px) {
    /* 小屏手机优化 */
    .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
}
