/* 自定义样式 */
.mirror-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.mirror-frame {
    position: relative;
    width: 400px;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 10px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 3px solid rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mirror-frame:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 15px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mirror-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 17px;
    transform: scaleX(-1); /* 镜像效果 */
    transition: filter 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
}

.mirror-video.flipped {
    transform: scaleX(1); /* 不翻转，显示别人看到的样子 */
}

.mirror-video.dragging {
    transition: none; /* 拖拽时禁用过渡动画 */
}

.mirror-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border-radius: 17px;
}

.mirror-reflection {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* 移除动画效果，保持简洁 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mirror-frame {
        width: 320px;
        height: 240px;
    }
    
    #double-mirror-container .flex {
        flex-direction: column;
        gap: 2rem;
    }
    
    #double-mirror-container .w-px {
        width: 100%;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(156, 163, 175, 0.5), transparent);
    }
}

/* 平滑过渡动画 */
.mirror-container {
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.mirror-container.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* 按钮动画 */
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
    transform: scale(0.98);
}

/* 加载动画 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 玻璃形态效果 */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 悬停效果 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 控制按钮样式 */
.mirror-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 20;
    flex-wrap: wrap;
    align-items: center;
}

.mirror-frame:hover .mirror-controls {
    opacity: 1;
    transform: translateY(0);
}

.control-btn {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.control-btn.active {
    background: rgba(59, 130, 246, 0.8);
}

.control-btn.active:hover {
    background: rgba(59, 130, 246, 1);
}

/* 控制滑块样式 */
.control-slider {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 6px 8px;
    transition: all 0.3s ease;
    min-width: 80px;
}

.control-slider:hover {
    background: rgba(0, 0, 0, 0.9);
}

.slider-icon {
    color: white;
    font-size: 12px;
    margin-right: 6px;
    user-select: none;
}

/* 自定义滑块样式 */
.control-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 50px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.control-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.control-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.control-slider input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.control-slider input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.control-slider input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* 全屏容器样式 */
.fullscreen-container {
    width: 90vw;
    height: 80vh;
    max-width: 1200px;
    max-height: 800px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 3px solid rgba(255, 255, 255, 0.8);
}

/* 全屏视频样式 */
.fullscreen-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 17px;
    transform: scaleX(-1); /* 默认镜像翻转 */
}

.fullscreen-video.flipped {
    transform: scaleX(1); /* 不翻转，显示别人看到的样子 */
}

/* 全屏悬浮控制面板 */
.fullscreen-controls {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 30;
    flex-wrap: wrap;
    align-items: center;
}

.fullscreen-container:hover .fullscreen-controls {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mirror-controls {
        top: 10px;
        right: 10px;
        gap: 6px;
        flex-direction: column;
        align-items: flex-end;
    }
    
    .control-btn {
        width: 32px;
        height: 32px;
    }
    
    .control-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .control-slider {
        min-width: 70px;
        padding: 4px 6px;
    }
    
    .control-slider input[type="range"] {
        width: 40px;
    }
    
    .slider-icon {
        font-size: 10px;
        margin-right: 4px;
    }
    
    .fullscreen-container {
        width: 95vw;
        height: 75vh;
        border-radius: 15px;
    }
    
    .fullscreen-controls {
        top: 10px;
        left: 10px;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* RTL语言支持 */
.rtl {
    direction: rtl;
}

.rtl .fixed.top-6.right-6 {
    left: 1.5rem;
    right: auto;
}

.rtl .language-dropdown {
    left: 0;
    right: auto;
}

.rtl .mirror-controls {
    left: 15px;
    right: auto;
}

.rtl .fullscreen-controls {
    right: 15px;
    left: auto;
}

.rtl .text-left {
    text-align: right;
}

.rtl .text-right {
    text-align: left;
}

.rtl .flex {
    flex-direction: row-reverse;
}

/* RTL响应式设计 */
@media (max-width: 768px) {
    .rtl .mirror-controls {
        left: 10px;
        right: auto;
    }
    
    .rtl .fullscreen-controls {
        right: 10px;
        left: auto;
    }
} 