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

html, body {
    width: 100%;
    height: 100%;
    background-color: #000;
    overflow: hidden;
    position: relative;
}

.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
    cursor: default;
}

/* Hide native controls completely when disabled */
#video:not([controls]) {
    cursor: default;
}

#video:not([controls])::-webkit-media-controls-panel {
    display: none !important;
    opacity: 0 !important;
}

#video:not([controls])::-webkit-media-controls-play-button {
    display: none !important;
}

#video:not([controls])::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Mobile optimization */
@media (max-width: 768px), (orientation: portrait) {
    #video {
        width: auto;
        height: 100%;
    }
}

.error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 18px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    display: none;
    max-width: 80%;
    z-index: 1000;
}

.error-message.info {
    background-color: rgba(0, 100, 200, 0.8);
}

.error-message.warning {
    background-color: rgba(200, 100, 0, 0.8);
}

/* Volume control - subtle corner icon */
.volume-control {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

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

.volume-control .volume-icon {
    width: 24px;
    height: 24px;
    color: white;
}

.volume-control .waves,
.volume-control .mute-line {
    transition: opacity 0.2s ease;
}

.volume-control .mute-line {
    opacity: 0;
}

.volume-control.muted .waves {
    opacity: 0;
}

.volume-control.muted .mute-line {
    opacity: 1;
}

/* Click-to-unmute overlay - visible by default when muted */
.mute-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 50;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.mute-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.mute-overlay-content svg {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes fadeOutDelayed {
    0%, 70% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}

/* Additional responsive styles for the video player */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    label {
        display: block;
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
    }
    
    input[type="text"] {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .input-group {
        margin-bottom: 20px;
    }
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

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

/* Button animations */
button {
    transition: background-color 0.3s ease;
}

/* Status message animations */
.status {
    transition: all 0.3s ease;
    border-left: 4px solid #17a2b8;
}

.status.error {
    border-left-color: #dc3545;
}

.status.success {
    border-left-color: #28a745;
}

.status.info {
    border-left-color: #17a2b8;
}