/* Base Styles */
html {
    overflow-y: hidden;
}

html.scroll-enabled {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    background: #000000;
    color: #ffffff;
    overflow-x: hidden;
    overflow-y: hidden;
    margin: 0;
    padding: 0;
}

body.scroll-enabled {
    overflow-y: auto;
}

/* Hero Section - Prevent gaps */
#hero {
    position: relative;
    overflow: hidden;
    background: #000000;
}

/* Show poster images immediately as background */
#media-left {
    background-image: url('../assets/posters/left-poster.jpg');
    background-size: cover;
    background-position: center;
}

#media-right {
    background-image: url('../assets/posters/right-poster.jpg');
    background-size: cover;
    background-position: center;
}

/* Video poster styling - ensure it covers properly with high quality */
#media-left video,
#media-right video {
    background: transparent;
}

#media-left video::poster,
#media-right video::poster {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

/* Global video quality optimization */
video {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: auto;
}

/* Prevent any transforms on videos */
video,
video * {
    transform: none !important;
}

/* Final video container - full screen without gaps */
#final-video-section {
    padding: 0 !important;
}

#final-video-container {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    position: relative;
}

#final-video-container video {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    perspective: 1000px;
    object-fit: contain;
}

/* Video control buttons */
#final-video-controls {
    transition: opacity 0.3s ease;
    gap: 2rem;
}

#final-video-controls.hidden-controls {
    opacity: 0;
    pointer-events: none;
}

.video-control-btn {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: transparent;
    backdrop-filter: none;
    border: none;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4));
}

.video-control-btn:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
}

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

.video-control-btn svg {
    width: 192px;
    height: 192px;
    stroke-width: 0.5;
}

/* Mobile responsive controls */
@media (max-width: 768px) {
    #final-video-controls {
        bottom: 1rem !important;
        right: 1rem !important;
        gap: 1rem !important;
    }

    .video-control-btn {
        width: 140px;
        height: 140px;
    }

    .video-control-btn svg {
        width: 112px;
        height: 112px;
    }
}

/* Mobile swipe indicator - fade out after 5 seconds */
@media (max-width: 1024px) {
    #video-editor-text-area .lg\:hidden {
        animation: fadeOutAfterDelay 1s ease-out 5s forwards;
    }
}

@keyframes fadeOutAfterDelay {
    from {
        opacity: 0.6;
    }
    to {
        opacity: 0;
        pointer-events: none;
    }
}

/* Space Background */
.space-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: -2;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Hero Section Clip Paths - SVG-based for smooth animation */
#media-left {
    clip-path: url(#hero-left-clip);
    will-change: clip-path;
}

#media-right {
    clip-path: url(#hero-right-clip);
    will-change: clip-path;
}

/* Desktop only - Prevent gaps by slightly overlapping */
@media (min-width: 1025px) {
    #media-left {
        transform: none;
    }

    #media-right {
        transform: none;
    }
}

/* Media Container - Full coverage */
.media-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
}

.media-wrapper {
    position: absolute;
    transform: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-item {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.blurred {
    filter: blur(10px);
    transition: filter 0.3s ease-in-out;
}

/* Hidden Elements */
[data-visibility="hidden"],
.visibility-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#dropzone {
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    display: block;
}


/* Policy Modal Custom Scrollbar - Subtle but visible */
#policy-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

#policy-content::-webkit-scrollbar {
    width: 8px;
}

#policy-content::-webkit-scrollbar-track {
    background: transparent;
}

#policy-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

#policy-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Header Text Base Styles - Smaller so they grow when clicked */
#merhaba-text-left,
#merhaba-text-right {
    font-size: 2.125rem !important; /* Reduced by 15% from 2.5rem to prevent text overflow */
    top: 20%;
    max-width: 90%;
    line-height: 1.2;
    /* Keep text centered and prevent movement when growing */
    transform-origin: center center;
    /* Always visible */
    opacity: 1 !important;
}

#merhaba-text-left {
    left: 25%;
}

#merhaba-text-right {
    left: 75%;
}

/* Tablet Portrait Responsive Styles */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    #merhaba-text-left,
    #merhaba-text-right {
        font-size: 1.5rem !important;
        top: 15%;
        max-width: 48%;
    }
}

/* Mobile Responsive Styles - Simple fixed sizes with !important to override */
@media (max-width: 768px) {
    #merhaba-text-left,
    #merhaba-text-right {
        font-size: 1.1rem !important;
        top: 12%;
        max-width: 48%;
    }
}

@media (max-width: 480px) {
    #merhaba-text-left,
    #merhaba-text-right {
        font-size: 0.95rem !important;
        top: 10%;
        max-width: 48%;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    #merhaba-text-left,
    #merhaba-text-right {
        font-size: 0.85rem !important;
        max-width: 48%;
    }
}

/* Hero Section Video/Image Coverage - High quality rendering (Desktop only) */
@media (min-width: 1025px) {
    #media-left video,
    #media-left img,
    #media-right video,
    #media-right img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        transform: none;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

    #media-left .media-wrapper,
    #media-right .media-wrapper {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
}

/* Mobile/Tablet - High quality video sizing */
@media (max-width: 1024px) {
    #media-left video,
    #media-left img,
    #media-right video,
    #media-right img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        transform: none;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

    #media-left .media-wrapper,
    #media-right .media-wrapper {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }
}

/* Language Switcher */
.lang-btn {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.4);
}

.lang-btn:hover {
    transform: scale(1.05);
}

/* Prevent flash of untranslated content */
html.lang-loading body {
    opacity: 0;
    transition: opacity 0.1s ease-in;
}

html.lang-ready body {
    opacity: 1;
}
