/* Component Styles */

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

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

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

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

/* Mobile and Tablet Responsive */
/* Tablets in portrait mode (768px-1024px) and all mobile devices */
@media (max-width: 1024px) {
    #hero {
        position: relative;
        min-height: 100vh;
        padding: 0;
        background: #000000;
        align-items: stretch;
        justify-content: center;
        gap: 0;
    }

    #screen-overlay {
        display: none;
    }

    #media-left,
    #media-right {
        position: relative !important;
        inset: unset !important;
        width: 100% !important;
        flex: 1 1 50%;
        min-height: 280px;
        max-height: 50vh;
        clip-path: none !important;
        border-radius: 0;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        background: #000000;
    }
    
    #media-left .media-container,
    #media-right .media-container {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    #media-left video,
    #media-right video {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    
    /* Video Editor Section - Mobile */
    #video-editor-section {
        padding: 0 !important;
        min-height: 100vh !important;
    }
    
    #video-editor-section > div {
        padding: 0 !important;
        max-width: 100% !important;
    }
    
    #dropzone {
        width: 100vw !important;
        height: auto !important;
        min-height: 50vh !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }
    
    #dropzone .media-wrapper {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
    }
    
    #dropzone img,
    #dropzone video {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        max-width: 100% !important;
    }
    
    .media-container {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Final Video Section - Mobile */
    #final-video-section {
        padding: 0 !important;
    }
    
    #final-video-container {
        width: 100% !important;
        height: 100vh !important;
        max-height: none !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    #final-video-container video {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    #placeholder-left,
    #placeholder-right {
        font-size: 1rem;
        text-align: center;
        padding: 0 1.25rem;
    }

    #merhaba-text-left,
    #merhaba-text-right {
        position: absolute;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 80%;
        text-align: center;
        font-size: 1.375rem;
        line-height: 1.3;
        letter-spacing: 0.07em;
        text-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
    }

    #hero-content {
        position: absolute;
        inset: 0;
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        padding: 0 1rem;
        text-align: center;
    }

    #hero-content .relative {
        width: 100%;
        max-width: 320px;
        padding: 0;
        border-radius: 0;
        background: none;
        border: none;
        box-shadow: none;
    }

    #hero-content h1 {
        font-size: 1.15rem;
        line-height: 1.15;
    }

    #hero-content button {
        width: 55%;
        min-width: 150px;
        margin: 0.75rem auto 0;
        pointer-events: auto;
    }
}

/* Tablet Landscape Override - Use desktop layout for tablets in landscape */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    #hero {
        position: relative;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }
    
    #media-left,
    #media-right {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        flex: none;
        min-height: unset;
        max-height: unset;
        clip-path: url(#hero-left-clip) !important;
    }
    
    #media-right {
        clip-path: url(#hero-right-clip) !important;
    }
    
    #media-left .media-container,
    #media-right .media-container {
        position: absolute !important;
        inset: 0 !important;
    }
    
    #merhaba-text-left,
    #merhaba-text-right {
        position: absolute;
        top: 20% !important;
        transform: translateX(-50%) !important;
        width: auto;
        max-width: 90%;
        text-align: center;
        font-size: 1.7rem !important; /* Reduced by 15% from 2rem to prevent text overflow */
    }
    
    #merhaba-text-left {
        left: 25% !important;
    }
    
    #merhaba-text-right {
        left: 75% !important;
    }
    
    #hero-content {
        position: relative;
        inset: unset;
        z-index: 20;
        pointer-events: auto;
    }
    
    #hero-content .relative {
        width: auto;
        max-width: unset;
        padding: 2rem;
    }
    
    #hero-content h1 {
        font-size: 1.875rem;
    }
    
    #hero-content button {
        width: auto;
        min-width: unset;
        margin: 1rem auto 0;
    }
    
    /* Video Editor Section - Desktop layout for landscape tablets */
    #video-editor-section {
        padding: 1rem 2rem !important;
        min-height: 100vh !important;
    }
    
    #video-editor-section > div {
        padding: 1.5rem 3.5rem !important;
        max-width: 88rem !important;
    }
    
    #dropzone {
        width: auto !important;
        height: 480px !important;
        min-height: unset !important;
        border-radius: 0.75rem !important;
        padding: 0 !important;
    }
    
    #dropzone .media-wrapper {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    #dropzone img,
    #dropzone video {
        width: 100% !important;
        height: 100% !important;
        display: block !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }
    
    .media-container {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* Desktop Final Video Section - Reduced by 15% */
@media (min-width: 1025px) {
    #final-video-container {
        width: 85% !important;
        height: 85% !important;
        max-width: 85vw !important;
        max-height: 85vh !important;
    }
    
    #final-video-container video {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
}
