/* ========================================
   nexUS Observatories - Video Components
   Intro Video, Cosmic Symphony Gallery
   ======================================== */

/* Intro Video Styles */
.intro-video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 3rem auto 2rem;
    border-radius: 15px;
    overflow: visible;
    background: rgba(10, 25, 47, 0.8);
    border: 2px solid var(--card-border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    animation: slideInVideo 1s ease-out 0.5s forwards;
    min-height: 260px;
}

.intro-video-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(79, 172, 254, 0.2);
}

.intro-video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
    border-radius: 13px;
    min-height: 260px;
    overflow: hidden;
}

.video-controls {
    position: absolute;
    bottom: 1px !important;
    right: 100px !important;
    display: flex;
    gap: 4px;
    opacity: 0.1;
    transition: opacity 0.3s ease;
    z-index: 100;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 25px;
    padding: 6px;
    border: 1px solid rgba(79, 172, 254, 0.5);
}

.intro-video-container:hover .video-controls {
    opacity: 1;
}

.video-control-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(79, 172, 254, 0.9);
    color: var(--dark-bg);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.video-control-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.video-control-btn:active {
    transform: scale(0.95);
}

/* Video loading state */
.intro-video-container.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(79, 172, 254, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

/* =============================================================================
   COSMIC SYMPHONY GALLERY STYLES - Full-Width Centered Ambient Video Component
   ============================================================================= */

.cosmic-symphony-gallery {
    text-align: center; /* Center all text content */
}

.cosmic-symphony-gallery h3 {
    color: var(--primary-color);
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center; /* Center the heading */
    gap: 0.5rem;
}

.cosmic-symphony-gallery h3 i {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.cosmic-symphony-gallery p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.symphony-video-container {
    position: relative;
    width: 100%;
    height: 200px; /* Default height - easily adjustable */
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--card-border);
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin: 0 auto; /* Center the video container */
    max-width: 90%; /* Add some padding on very wide screens */
}

.symphony-video-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(79, 172, 254, 0.2);
    border-color: var(--primary-color);
}

.cosmic-symphony-video {
    width: 100%;
    height: 100%; /* Fill container exactly */
    display: block;
    background: #000;
    border-radius: 8px;
    object-fit: cover; /* Crop to fit container */
    object-position: center; /* Center the video content */
}

.symphony-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        transparent 30%,
        transparent 70%,
        rgba(0, 0, 0, 0.5) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.symphony-video-container:hover .symphony-overlay {
    opacity: 1;
}

.symphony-info {
    position: absolute;
    top: 15px;
    left: 15px;
    pointer-events: auto;
}

.symphony-status {
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: var(--font-display);
    border: 1px solid rgba(79, 172, 254, 0.3);
    backdrop-filter: blur(10px);
    display: inline-block;
}

.symphony-description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.symphony-description p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0.3rem 0;
    opacity: 0.8;
}

/* Symphony video states */
.cosmic-symphony-video.tab-inactive {
    filter: grayscale(50%) brightness(0.7);
}

.symphony-status.paused {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
}

.symphony-status.playing {
    color: #4facfe;
    border-color: rgba(79, 172, 254, 0.3);
}

/* Mobile responsive adjustments for videos */
@media (max-width: 768px) {
    .intro-video-container {
        margin: 2rem auto 1.5rem;
        min-height: 200px;
    }

    /* Cosmic Symphony Gallery mobile - FIXED HEIGHT */
    .symphony-video-container {
        height: 300px !important; /* Fixed height for mobile, larger than desktop */
        max-width: 95%; /* More padding on mobile */
        margin: 1rem auto; /* Center with margin */
    }

    .symphony-info {
        top: 10px;
        left: 10px;
    }

    .symphony-status {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .symphony-description {
        margin-top: 0.8rem;
        padding-top: 0.8rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .intro-video-container,
    .symphony-video-container {
        transition: none;
        animation: none;
    }
}