﻿/* Video Modal Styles - Enhanced Design */
.video-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}

.video-modal.show {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    position: relative;
    margin: 2% auto;
    width: 95%;
    max-width: 1200px;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-radius: 12px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    font-family: "Raleway", sans-serif;
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
    transition: all 0.25s ease-out;
}

.video-modal.show .video-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.video-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e62b4c, #C41735, #e62b4c);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s ease-out 0.1s;
}

.video-modal.show .video-modal-content::before {
    opacity: 1;
}

.video-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    z-index: 10000;
    background: linear-gradient(135deg, #e62b4c, #C41735);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(230, 43, 76, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: scale(0.8);
}

.video-modal.show .video-close {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.15s;
}

.video-close:hover,
.video-close:focus {
    background: linear-gradient(135deg, #C41735, #a01429);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(230, 43, 76, 0.5);
    text-decoration: none;
    cursor: pointer;
}

.video-container {
    position: relative;
    padding: 25px 25px 25px;
    background: #1a1a1a;
}

.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25px;
    right: 25px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(230, 43, 76, 0.5), transparent);
}

.video-container video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    outline: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

/* 隐藏浏览器自带播放器的下载按钮 */
.video-container video::-webkit-media-controls-download-button {
    display: none !important;
}

.video-container video::-webkit-media-controls-enclosure {
    overflow: hidden;
}

/* Firefox浏览器 */
.video-container video::-moz-media-controls-download-button {
    display: none !important;
}

/* 通用方法：禁用右键菜单防止下载 */
.video-container video {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: auto;
}

/* 禁用右键菜单 */
.video-container {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.video-controls {
    padding: 20px 25px 25px;
    text-align: center;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    border-top: 1px solid rgba(230, 43, 76, 0.2);
    position: relative;
    display: flex;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease-out 0.2s;
}

.video-modal.show .video-controls {
    opacity: 1;
    transform: translateY(0);
}

.video-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e62b4c, transparent);
}

.control-btn {
    display: inline-block;
    padding: 12px 25px;
    background: linear-gradient(135deg, #e62b4c, #C41735);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(230, 43, 76, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: "Raleway", sans-serif;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-width: 80px;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:hover {
    background: linear-gradient(135deg, #C41735, #a01429);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 43, 76, 0.4);
}

.control-btn.secondary {
    background: linear-gradient(135deg, #666, #444);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.control-btn.secondary:hover {
    background: linear-gradient(135deg, #555, #333);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Smooth Animations - No Flash */

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(230, 43, 76, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(230, 43, 76, 0.5);
    }
}

/* Enhanced Responsive Design */
@media (max-width: 1024px) {
    .video-modal-content {
        margin: 3% auto;
        width: 92%;
        max-width: 1000px;
    }
}

@media (max-width: 768px) {
    .video-modal-content {
        margin: 5% auto;
        width: 95%;
        max-width: 700px;
        border-radius: 10px;
    }

    .video-container {
        padding: 20px 20px 20px;
    }

    .video-container::before {
        left: 20px;
        right: 20px;
    }

    .video-close {
        top: 12px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .video-controls {
        padding: 18px 20px 20px;
        gap: 12px;
    }

    .control-btn {
        padding: 10px 20px;
        font-size: 12px;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .video-modal-content {
        margin: 8% auto;
        width: 98%;
        max-width: 450px;
        border-radius: 8px;
    }

    .video-container {
        padding: 15px 15px 15px;
    }

    .video-container::before {
        left: 15px;
        right: 15px;
    }

    .video-container video {
        border-radius: 6px;
    }

    .video-close {
        top: 8px;
        right: 12px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .video-controls {
        padding: 15px 15px 18px;
        gap: 10px;
        flex-direction: column;
    }

    .control-btn {
        padding: 8px 16px;
        font-size: 11px;
        letter-spacing: 0.5px;
        min-width: 60px;
    }
}

/* Enhanced Loading State */
.video-loading {
    text-align: center;
    padding: 50px 40px;
    color: #fff;
    font-family: "Raleway", sans-serif;
    font-weight: 500;
    font-size: 16px;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
}

.video-loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(230, 43, 76, 0.3);
    border-radius: 50%;
    border-top-color: #e62b4c;
    animation: spin 1s linear infinite;
    margin-left: 12px;
    vertical-align: middle;
}

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

/* Video Title */
.video-title {
    padding: 15px 25px 0;
    background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease-out 0.1s;
}

.video-modal.show .video-title {
    opacity: 1;
    transform: translateY(0);
}

.video-title h3 {
    color: #fff;
    font-family: "Raleway", sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.video-title h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #e62b4c, #C41735);
    margin: 8px auto 0;
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.3s ease-out 0.2s;
}

.video-modal.show .video-title h3::after {
    opacity: 1;
}

/* Enhanced Video Controls */
.video-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.video-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-family: "Raleway", sans-serif;
    text-align: center;
    margin-top: 10px;
}

/* Backdrop blur support check */
@supports not (backdrop-filter: blur(5px)) {
    .video-modal {
        background: rgba(0, 0, 0, 0.9);
    }
}
