/* VEA CAST Receiver Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    user-select: none;
    cursor: none; /* Hide cursor for full immersion */
}

/* Show cursor on interaction */
body.interactive {
    cursor: default;
}

.receiver-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

#receiverVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Status overlay with modern design */
.status-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    transition: all 0.3s ease;
    min-width: 200px;
}

.status-overlay.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.status-title {
    font-size: 14px;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-title::before {
    content: "●";
    color: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-item {
    font-size: 12px;
    margin-bottom: 6px;
    color: #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-item strong {
    color: #fff;
    margin-right: 8px;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-icon {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    color: #fff;
    text-align: center;
    font-weight: 300;
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* Error overlay */
.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a0000 0%, #330000 100%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
}

.error-icon {
    width: 80px;
    height: 80px;
    border: 3px solid #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #dc3545;
    margin-bottom: 24px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-text {
    font-size: 20px;
    color: #dc3545;
    text-align: center;
    margin-bottom: 12px;
    font-weight: 500;
}

.error-subtitle {
    font-size: 14px;
    color: #999;
    text-align: center;
    max-width: 400px;
    line-height: 1.4;
}

/* Waiting overlay */
.waiting-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000 0%, #001122 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 15;
}

.waiting-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 32px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.waiting-icon svg {
    width: 100%;
    height: 100%;
    fill: #007bff;
    filter: drop-shadow(0 0 10px rgba(0, 123, 255, 0.3));
}

.waiting-text {
    font-size: 24px;
    color: #fff;
    text-align: center;
    margin-bottom: 12px;
    font-weight: 300;
}

.waiting-subtitle {
    font-size: 16px;
    color: #666;
    text-align: center;
    max-width: 500px;
    line-height: 1.5;
}

/* TV Info */
.tv-info {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    color: #ccc;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.tv-info:hover {
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
}

/* Hide overlays when video is playing */
.playing .status-overlay,
.playing .tv-info {
    opacity: 0.1;
    transform: scale(0.95);
}

.playing .status-overlay:hover,
.playing .tv-info:hover {
    opacity: 1;
    transform: scale(1);
}

/* Connection status indicators */
.status-connected {
    color: #28a745 !important;
}

.status-connecting {
    color: #ffc107 !important;
}

.status-disconnected {
    color: #dc3545 !important;
}

.status-live {
    color: #ff4757 !important;
}

.status-ready {
    color: #007bff !important;
}

/* Interactive elements */
.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable:hover {
    transform: scale(1.05);
}

/* Responsive design */
@media (max-width: 768px) {
    .status-overlay {
        top: 10px;
        left: 10px;
        padding: 12px;
        min-width: 180px;
    }
    
    .status-title {
        font-size: 12px;
    }
    
    .status-item {
        font-size: 11px;
    }
    
    .tv-info {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 10px;
    }
    
    .loading-text {
        font-size: 16px;
    }
    
    .waiting-text {
        font-size: 20px;
    }
    
    .waiting-subtitle {
        font-size: 14px;
        padding: 0 20px;
    }
    
    .error-text {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .status-overlay {
        top: 5px;
        left: 5px;
        padding: 10px;
        min-width: 160px;
    }
    
    .tv-info {
        bottom: 5px;
        right: 5px;
        padding: 6px 10px;
        font-size: 9px;
    }
    
    .waiting-icon {
        width: 80px;
        height: 80px;
    }
    
    .loading-icon {
        width: 50px;
        height: 50px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .loading-icon,
    .waiting-icon,
    .status-title::before {
        animation: none;
    }
    
    .status-overlay,
    .tv-info,
    .loading-overlay {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .status-overlay,
    .tv-info {
        background: rgba(0, 0, 0, 0.95);
        border: 2px solid #fff;
    }
    
    .status-item {
        color: #fff;
    }
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    .loading-overlay {
        background: linear-gradient(135deg, #000 0%, #111 100%);
    }
    
    .waiting-overlay {
        background: linear-gradient(135deg, #000 0%, #001133 100%);
    }
}

/* Print styles (hide all overlays) */
@media print {
    .status-overlay,
    .tv-info,
    .loading-overlay,
    .waiting-overlay,
    .error-overlay {
        display: none !important;
    }
}