/* Video Coach Tiles Styles */
.vct-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vct-video-grid {
    display: flex;
    height: 100%;
    gap: 2px;
}

.vct-tile {
    flex: 1;
    position: relative;
    background: #f8f9fa;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e6ed;
}

.vct-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* User Tile (eigene Kamera) */
.vct-user-tile {
    border-right: 1px solid #e0e6ed;
}

.vct-user-tile video {
    transform: scaleX(-1); /* Video spiegeln */
}

.vct-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.vct-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}

.vct-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.vct-camera-btn img {
    width: 32px;
    height: 32px;
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.vct-camera-btn .camera-off {
    display: none;
}

.vct-camera-btn.camera-disabled .camera-on {
    display: none;
}

.vct-camera-btn.camera-disabled .camera-off {
    display: block;
}

.vct-camera-btn.camera-disabled img {
    filter: brightness(0) saturate(100%) invert(24%) sepia(95%) saturate(7498%) hue-rotate(4deg) brightness(95%) contrast(118%);
}

.vct-camera-btn.camera-disabled {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.9);
    color: white;
}

/* Placeholder wenn Kamera aus */
.vct-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    border: 1px solid #e0e6ed;
}

.vct-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(107, 114, 128, 0.1);
    border: 3px solid rgba(107, 114, 128, 0.2);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.vct-avatar::before {
    content: '';
    width: 24px;
    height: 24px;
    background: rgba(107, 114, 128, 0.6);
    border-radius: 50%;
    position: relative;
    top: -3px;
}

.vct-avatar::after {
    content: '';
    width: 36px;
    height: 24px;
    background: rgba(107, 114, 128, 0.6);
    border-radius: 36px 36px 0 0;
    position: absolute;
    bottom: -3px;
}

.vct-name {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
}

/* Dummy Video Tile */
.vct-dummy-tile {
    position: relative;
}

.vct-dummy-tile canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    z-index: 1;
}

.vct-dummy-tile.paused canvas {
    display: block;
}

.vct-dummy-tile.paused video {
    opacity: 0;
}

.vct-dummy-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* Play/Pause CSS Icons */
.pause-icon {
    width: 24px;
    height: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.pause-icon::before,
.pause-icon::after {
    content: '';
    width: 4px;
    height: 20px;
    background: white;
    border-radius: 1px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.pause-icon::before {
    left: 50%;
    margin-left: -6px;
}

.pause-icon::after {
    left: 50%;
    margin-left: 2px;
}

.play-icon {
    width: 24px;
    height: 24px;
    position: relative;
    display: none;
    margin: 0 auto;
}

.play-icon::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 16px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-30%, -50%);
}

.vct-dummy-btn.paused .pause-icon {
    display: none;
}

.vct-dummy-btn.paused .play-icon {
    display: block;
}

.vct-name-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    z-index: 5;
    border: 1px solid #e0e6ed;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .vct-container {
        margin: 0 auto;
    }
    
    .vct-video-grid {
        flex-direction: column;
        gap: 2px;
    }
    
    .vct-user-tile {
        border-right: none;
        border-bottom: 1px solid #e0e6ed;
    }
    
    .vct-tile {
        min-height: 150px;
    }
    
    .vct-avatar {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .vct-container {
        margin: 0 auto;
    }
}

/* Loading State */
.vct-tile video:not([src]) {
    background: #2d2d2d;
}

.vct-tile::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #666;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.vct-tile video[src]::before,
.vct-tile.video-loaded::before {
    display: none;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Error State für Avatar */
.vct-avatar.error {
    border-color: rgba(255, 100, 100, 0.6);
    background: rgba(255, 100, 100, 0.2);
}

.vct-avatar.error::before {
    background: rgba(255, 100, 100, 0.8);
    width: 16px;
    height: 16px;
    top: 0;
}

.vct-avatar.error::after {
    background: rgba(255, 100, 100, 0.8);
    width: 28px;
    height: 18px;
}