/* Main CSS for Panamorphix CMS */

/* Video-based Homepage - Apple Vision Pro Style */
.scroll-container {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
    scroll-behavior: smooth;
    position: relative;
    background-color: #000;
}

.video-section {
    position: relative;
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.video-section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 30%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.video-text-container {
    position: relative;
    z-index: 2;
    color: white;
    width: 100%;
    padding: 0 5%;
}

.video-text-content {
    max-width: 600px;
    text-align: left;
    margin-left: 5%;
    animation: fadeInLeft 1s ease-out;
}

.video-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    /* Removed text shadow for cleaner typography */
    color: white;
}

.video-description {
    font-size: 1.25rem;
    line-height: 1.6;
    opacity: 0.9;
    /* Removed text shadow for cleaner typography */
    max-width: 90%;
    color: white;
}

/* Placeholder for empty state */
.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.placeholder-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 2rem;
}

/* Animation Classes */
.fade-in, .slide-in-left, .slide-in-right, .scale-in {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in {
    transition-property: opacity;
}

.slide-in-left {
    transform: translateX(-50px);
}

.slide-in-right {
    transform: translateX(50px);
}

.scale-in {
    transform: scale(0.9);
}

.fade-in.visible, 
.slide-in-left.visible, 
.slide-in-right.visible, 
.scale-in.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Video Content Animation */
.video-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.video-content.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Video Section Effects */
.video-section {
    --section-visibility: 0;
}

.video-section.active .video-background {
    filter: saturate(calc(0.8 + (var(--section-visibility) * 0.4)));
}

/* Fallback and Error States */
.video-section.video-error .video-background {
    display: none;
}

.fallback-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #111;
    background-image: linear-gradient(45deg, #111 25%, #222 25%, #222 50%, #111 50%, #111 75%, #222 75%, #222 100%);
    background-size: 20px 20px;
    z-index: 0;
    opacity: 0.5;
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    z-index: 1;
    text-align: center;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

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

/* Parallax Effect */
.parallax {
    will-change: transform;
    transition: transform 0.05s ease-out;
}

/* Keyframe Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Easter Egg Game Trigger */
.easter-egg-trigger {
    position: absolute;
    width: 150px;
    height: 150px;
    cursor: pointer;
    opacity: 0; /* Invisible but clickable */
    z-index: 10;
    transition: opacity 0.3s;
}

.easter-egg-trigger:hover {
    opacity: 0.2; /* Slightly visible on hover for debugging */
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

/* Game Overlay */
#game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
}

#game-frame {
    width: 90%;
    height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
}

#close-game-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

#close-game-button:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .video-title {
        font-size: 2.5rem;
    }
    
    .video-description {
        font-size: 1.2rem;
    }
    
    .easter-egg-trigger {
        width: 100px;
        height: 100px;
    }
}