/**
 * Live-Dabei Streaming - Frontend Styles
 * Version: 1.0.0
 */

/* ============================================
   Player Container
   ============================================ */

.lds-player-container {
    position: relative;
    margin: 0 auto;
    max-width: 100%;
}

.lds-player-wrapper {
    position: relative;
    width: 100%;
}

/* Responsive Player */
.lds-player-responsive .lds-player-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.lds-player-responsive .lds-player,
.lds-player-responsive .lds-loading,
.lds-player-responsive .lds-offline {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
}

/* Hero Banner Player */
.lds-player-hero {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.lds-player-hero .lds-player,
.lds-player-hero .lds-loading,
.lds-player-hero .lds-offline {
    min-height: 500px;
    height: 70vh;
    max-height: 800px;
}

/* ============================================
   Loading State
   ============================================ */

.lds-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.lds-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lds-spin 0.8s linear infinite;
    margin-bottom: 20px;
}

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

.lds-loading p {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
}

/* ============================================
   Offline State
   ============================================ */

.lds-offline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    color: #fff;
    text-align: center;
    padding: 40px 20px;
}

.lds-offline-icon {
    opacity: 0.3;
    margin-bottom: 20px;
}

.lds-offline h3 {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px;
}

.lds-offline p {
    font-size: 16px;
    opacity: 0.7;
    margin: 0 0 30px;
}

.lds-reload-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lds-reload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* ============================================
   Live Player
   ============================================ */

.lds-player {
    position: relative;
    background: #000;
}

.lds-iframe,
.lds-video {
    width: 100%;
    height: 100%;
    display: block;
}

.lds-iframe {
    border: none;
}

.lds-video {
    object-fit: contain;
}

/* Live Badge */
.lds-live-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(220, 38, 38, 0.95);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lds-live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: lds-pulse 2s ease-in-out infinite;
}

@keyframes lds-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============================================
   Player Controls
   ============================================ */

.lds-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.lds-player:hover .lds-controls {
    opacity: 1;
}

.lds-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.lds-room-name {
    font-size: 16px;
    font-weight: 600;
}

.lds-cam-name {
    font-size: 14px;
    opacity: 0.8;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

.lds-record-btn,
.lds-fullscreen-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lds-record-btn:hover,
.lds-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lds-record-btn.recording {
    background: rgba(220, 38, 38, 0.9);
}

/* Playlist Controls */
.lds-playlist-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.lds-playlist-prev,
.lds-playlist-next {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.lds-playlist-prev:hover,
.lds-playlist-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.lds-playlist-info {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 0 5px;
}

.lds-playlist-current {
    color: #50e3c2;
}

/* ============================================
   Mediathek
   ============================================ */

.lds-mediathek {
    margin: 40px 0;
}

.lds-mediathek-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.lds-col-1 { grid-template-columns: 1fr; }
.lds-col-2 { grid-template-columns: repeat(2, 1fr); }
.lds-col-3 { grid-template-columns: repeat(3, 1fr); }
.lds-col-4 { grid-template-columns: repeat(4, 1fr); }

.lds-no-recordings {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
    background: #f5f5f5;
    border-radius: 12px;
}

/* ============================================
   Recording Card
   ============================================ */

.lds-recording-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.lds-recording-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.lds-recording-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.lds-recording-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lds-recording-card:hover .lds-recording-thumbnail img {
    transform: scale(1.05);
}

.lds-recording-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
}

.lds-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.lds-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    color: #fff;
    opacity: 0;
    transition: all 0.3s ease;
}

.lds-recording-card:hover .lds-play-overlay {
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
}

/* ============================================
   Recording Content
   ============================================ */

.lds-recording-content {
    padding: 20px;
}

.lds-recording-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.lds-recording-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lds-recording-title a:hover {
    color: #667eea;
}

.lds-recording-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
}

.lds-recording-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lds-recording-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.lds-recording-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: gap 0.3s ease;
}

.lds-recording-link:hover {
    gap: 10px;
}

/* ============================================
   Pagination
   ============================================ */

.lds-mediathek-pagination {
    text-align: center;
    margin-top: 40px;
}

.lds-view-all {
    display: inline-block;
    background: #667eea;
    color: #fff;
    padding: 14px 32px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lds-view-all:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .lds-col-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .lds-col-3,
    .lds-col-4 { grid-template-columns: repeat(2, 1fr); }
    
    .lds-player-hero .lds-player,
    .lds-player-hero .lds-loading,
    .lds-player-hero .lds-offline {
        min-height: 300px;
        height: 50vh;
    }
    
    .lds-live-badge {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .lds-controls {
        padding: 15px;
    }
    
    .lds-room-name {
        font-size: 14px;
    }
    
    .lds-cam-name {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .lds-col-2,
    .lds-col-3,
    .lds-col-4 { grid-template-columns: 1fr; }
    
    .lds-mediathek-grid {
        gap: 20px;
    }
    
    .lds-recording-title {
        font-size: 16px;
    }
    
    .lds-offline h3 {
        font-size: 22px;
    }
}

/* ============================================
   Notifications
   ============================================ */

.lds-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    color: #1a1a1a;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
    font-size: 14px;
    font-weight: 500;
}

.lds-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.lds-notification-success {
    border-left: 4px solid #28a745;
}

.lds-notification-error {
    border-left: 4px solid #dc3545;
}

.lds-notification-info {
    border-left: 4px solid #667eea;
}

/* ============================================
   Fullscreen Mode
   ============================================ */

.lds-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    background: #000;
}

.lds-fullscreen .lds-player {
    width: 100%;
    height: 100%;
}

.lds-fullscreen .lds-controls {
    opacity: 0;
}

.lds-fullscreen .lds-player:hover .lds-controls {
    opacity: 1;
}
