/**
 * Video Player Plugin Styles
 * 双平台视频播放器样式 - Font Awesome版本
 * Version: 2.0.0
 */

/* CSS Variables */
:root {
    --bilibili-pink: #FB7299;
    --youtube-red: #FF0000;
    --bg-card: #16213e;
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
}

/* Main Player Card */
.video-player-card {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Video Container - Use aspect-ratio for modern browsers */
.video-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

/* Fallback for older browsers */
@supports not (aspect-ratio: 16 / 9) {
    .video-player-container {
        padding-bottom: 56.25%;
        height: 0;
    }
}

/* Video Frames */
.video-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.video-frame.active {
    opacity: 1;
    visibility: visible;
}

.video-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    margin: 0;
    padding: 0;
    display: block;
}

/* Platform Switcher - Compact Design */
.platform-switcher {
    padding: 8px 12px;
    background: #000;
    display: flex;
    justify-content: center;
}

/* Toggle Container */
.platform-toggle {
    display: flex;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 3px;
    gap: 3px;
}

/* Toggle Slider */
.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: var(--bilibili-pink);
    border-radius: 47px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    z-index: 1;
}

.video-player-card[data-active-platform="youtube"] .toggle-slider {
    transform: translateX(100%);
    background: var(--youtube-red);
}

/* Platform Buttons */
.platform-btn {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 47px;
    transition: color 0.3s ease;
    white-space: nowrap;
    line-height: 1;
}

.platform-btn:hover {
    color: var(--text-light);
}

.platform-btn.active {
    color: var(--text-light);
}

/* Platform Icons - Font Awesome */
.platform-btn i {
    font-size: 18px;
}

/* Bilibili specific styling */
.platform-btn.bilibili-btn i {
    color: inherit;
}

/* YouTube specific styling */
.platform-btn.youtube-btn i {
    color: inherit;
}

/* Responsive */
@media (max-width: 480px) {
    .video-player-card {
        margin: 10px 0;
        border-radius: 12px;
    }

    .platform-switcher {
        padding: 6px 10px;
    }

    .platform-btn {
        padding: 3px 10px;
        font-size: 12px;
        gap: 3px;
    }

    .platform-btn i {
        font-size: 16px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .video-frame,
    .toggle-slider,
    .platform-btn {
        transition: none;
    }
}
