/**
 * 移动端交互样式模块
 * 为Hammer.js交互提供视觉反馈
 */

/* 交互反馈层 */
.interaction-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 移动端控制栏过渡效果 */
.mobile-controls-overlay {
    transition: opacity 0.3s ease;
}

.mobile-controls-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 滑动指示器 */
.swipe-indicator {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 107, 157, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    z-index: 999;
    animation: swipePulse 0.6s ease-out;
}

@keyframes swipePulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* 进度条反馈 */
.seek-feedback {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #ff6b9d;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
}

/* 音量控制反馈 */
.volume-feedback {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 10px;
    color: white;
    font-size: 12px;
}

/* 视频信息层 */
.video-info-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1001;
    padding: 20px;
    color: white;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.video-info-layer.visible {
    transform: translateY(0);
}

.video-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.video-info-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.video-info-content h3 {
    color: #ff6b9d;
    margin-bottom: 10px;
}

.video-info-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* 手势提示 */
.gesture-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 15px;
    color: #ccc;
    font-size: 12px;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .interaction-feedback {
        font-size: 14px;
        padding: 10px 16px;
    }
    
    .swipe-indicator {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* 暗色主题适配 */
[data-theme="dark"] .interaction-feedback {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/* 高性能动画优化 */
.interaction-feedback,
.swipe-indicator,
.seek-feedback {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* 触摸反馈禁用时的样式 */
.player-ui.no-interaction .interaction-feedback,
.player-ui.no-interaction .swipe-indicator {
    display: none;
}

/* 加载状态 */
.interaction-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}