/* ===== MOBILE APP RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    /* Mobile viewport fix */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    /* Smooth scrolling */
    scroll-behavior: smooth;
    /* Hardware acceleration */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    max-width: 100vw;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.4;
    
    /* Disable text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Mobile optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

/* ===== MOBILE APP CONTAINER ===== */
.mobile-app {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    position: relative;
}

/* Force correct order for all sections */
.mobile-app > * {
    flex-shrink: 0;
}

/* Safe Areas for Notch/Dynamic Island */
.safe-area-top {
    height: env(safe-area-inset-top, 0px);
    background: #ffffff;
    width: 100%;
}

.safe-area-bottom {
    height: env(safe-area-inset-bottom, 0px);
    background: #1a1a1a;
    width: 100%;
}

/* ===== DISABLE INTERACTIONS ===== */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
    -webkit-touch-callout: none;
}

/* Disable text selection */
::selection {
    background: transparent;
}

::-moz-selection {
    background: transparent;
}

/* ===== HEADLINE SECTION ===== */
.headline-section {
    width: 100%;
    background: #ffffff;
    padding: 20px 16px;
    text-align: center;
    order: 1; /* Força ordem correta */
}

.headline-content {
    max-width: 100%;
    margin: 0 auto;
}

.headline-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #333333;
    margin: 0;
    text-align: center;
}

.headline-title .highlight {
    color: #ff6b35;
    font-weight: 800;
}

/* ===== VIDEO SECTION ===== */
.video-section {
    width: 100%;
    background: #000000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Mobile optimization - Vertical video like TikTok */
    min-height: 60vh;
    max-height: 75vh;
    order: 2; /* Força ordem correta */
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    /* Mobile video optimization */
    overflow: hidden;
    border-radius: 12px;
    margin: 0 8px;
}

/* VTurb Video Container */
.video-container > div {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 75vh;
    overflow: hidden;
    border-radius: 12px;
    background: #000000;
}

/* VTurb Smart AutoPlay Image */
.main-video-gif {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 75vh;
    object-fit: cover;
    display: block;
    outline: none;
    border-radius: 12px;
    /* Mobile optimization */
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Prevent image drag */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* VTurb SmartPlayer Container */
#smartplayer {
    border-radius: 12px !important;
    overflow: hidden !important;
    max-height: 75vh !important;
    height: auto !important;
    position: relative !important;
    z-index: 1 !important;
}

#smartplayer .smartplayer-content {
    border-radius: 12px;
    background: #000000;
}

#smartplayer .smartplayer-video-wrap {
    border-radius: 12px;
}

#smartplayer .smartplayer-video {
    border-radius: 12px;
    object-fit: cover;
}

/* Smart AutoPlay Image Override */
#smartplayer .smartplayer-autoplay-img-element {
    border-radius: 12px !important;
    object-fit: cover !important;
}

.vturb-video-player {
    width: 100%;
    height: 100%;
    max-height: 75vh;
    object-fit: cover;
    display: block;
    outline: none;
    background: #000000;
    border-radius: 12px;
    /* Mobile video performance */
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Mobile video optimizations */
    -webkit-appearance: none;
    appearance: none;
    /* Remove default controls styling */
    &::-webkit-media-controls {
        display: none !important;
    }
    &::-webkit-media-controls-panel {
        display: none !important;
    }
    &::-webkit-media-controls-play-button {
        display: none !important;
    }
    &::-webkit-media-controls-start-playback-button {
        display: none !important;
    }
}

/* Video Overlay for Custom Controls */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: none;
}

.video-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.video-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

.play-button {
    cursor: pointer;
    transition: transform 0.2s ease;
    pointer-events: all;
}

.play-button:hover {
    transform: scale(1.1);
}

.play-button:active {
    transform: scale(0.95);
}

/* Video playing state */
.vturb-player-container.playing .video-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Legacy video styles for compatibility */
.main-video {
    width: 100%;
    height: 100%;
    max-height: 75vh;
    object-fit: cover;
    display: block;
    outline: none;
    background: #000000;
    border-radius: 12px;
    /* Mobile video performance */
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Prevent video controls issues on mobile */
    -webkit-appearance: none;
    appearance: none;
}

/* ===== DELAYED BUTTON ===== */
.delayed-button {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    
    /* Button styling */
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    
    /* Size and typography */
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    
    /* Effects */
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Mobile touch */
    min-height: 48px;
    min-width: 200px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    
    /* Animation */
    opacity: 0;
    animation: slideInUp 0.6s ease-out forwards;
    z-index: 1000;
}

.delayed-button:active {
    transform: translateX(-50%) scale(0.98);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
}

.delayed-button.hidden {
    display: none;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== COMPANY LOGOS SECTION ===== */
.logos-section {
    width: 100%;
    background: #ffffff;
    padding: 24px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 3; /* Força ordem correta */
}

.logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    max-width: 300px;
    margin: 0 auto;
}

.logo-item {
    flex: 1;
    min-width: 60px;
    max-width: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.company-logo {
    width: 100%;
    max-width: 70px;
    height: auto;
    max-height: 40px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.company-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* ===== FOOTER ===== */
.footer {
    background-color: #1a1a1a;
    color: #888888;
    padding: 24px 16px;
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
    margin-top: auto;
    order: 4; /* Força ordem correta */
    position: relative;
    z-index: 0;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.copyright {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 13px;
}

.disclaimer {
    margin-bottom: 16px;
    color: #aaaaaa;
    font-size: 11px;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-link {
    color: #888888;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 11px;
}

.footer-link:hover,
.footer-link:active {
    color: #ffffff;
}

.separator {
    color: #666666;
    font-size: 11px;
}

/* ===== MOBILE RESPONSIVE ===== */

/* Large phones (414px and up) */
@media screen and (min-width: 414px) {
    .headline-title {
        font-size: 22px;
    }
    
    .delayed-button {
        padding: 18px 36px;
        font-size: 19px;
        min-width: 220px;
    }
    
    .logos-container {
        max-width: 350px;
        gap: 30px;
    }
    
    .company-logo {
        max-width: 80px;
        max-height: 45px;
    }
}

/* Standard phones (375px to 413px) */
@media screen and (max-width: 413px) {
    .headline-title {
        font-size: 19px;
        padding: 0 8px;
    }
    
    .delayed-button {
        padding: 15px 30px;
        font-size: 17px;
        min-width: 180px;
        bottom: 16px;
    }
    
    .footer {
        padding: 20px 12px;
        font-size: 11px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 6px;
    }
    
    .separator {
        display: none;
    }
    
    .logos-container {
        gap: 20px;
    }
    
    .company-logo {
        max-width: 65px;
        max-height: 35px;
    }
}

/* Small phones (320px to 374px) */
@media screen and (max-width: 374px) {
    .headline-title {
        font-size: 18px;
        padding: 0 4px;
    }
    
    .delayed-button {
        padding: 14px 28px;
        font-size: 16px;
        min-width: 160px;
        bottom: 12px;
    }
    
    .footer {
        padding: 16px 10px;
        font-size: 10px;
    }
    
    .disclaimer {
        font-size: 10px;
    }
    
    .logos-container {
        gap: 16px;
    }
    
    .company-logo {
        max-width: 60px;
        max-height: 32px;
    }
}

/* ===== MOBILE DEVICE SPECIFIC OPTIMIZATIONS ===== */

/* iPhone SE and similar small screens */
@media screen and (max-width: 375px) and (max-height: 667px) {
    .video-container {
        max-height: 55vh;
        min-height: 45vh;
    }
    
    .main-video {
        max-height: 55vh;
    }
    
    .delayed-button {
        bottom: 15px;
        padding: 12px 24px;
        font-size: 15px;
    }
}

/* iPhone 12/13/14 standard */
@media screen and (max-width: 390px) and (max-height: 844px) {
    .video-container {
        max-height: 60vh;
        min-height: 50vh;
    }
    
    .main-video {
        max-height: 60vh;
    }
}

/* iPhone 12/13/14 Pro Max */
@media screen and (max-width: 428px) and (max-height: 926px) {
    .video-container {
        max-height: 65vh;
        min-height: 55vh;
    }
    
    .main-video {
        max-height: 65vh;
    }
}

/* Portrait orientation optimization */
@media screen and (orientation: portrait) {
    .mobile-app {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height */
    }
    
    .video-section {
        min-height: 60vh;
        max-height: 75vh;
    }
    
    .video-container {
        max-height: 75vh;
    }
    
    .main-video {
        max-height: 75vh;
        /* Optimize for portrait video - like TikTok style */
        object-fit: cover;
    }
    
    .headline-section {
        padding: 16px 12px;
    }
    
    .logos-section {
        padding: 20px 12px;
    }
}

/* Landscape orientation (discouraged but handled) */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .video-container {
        max-height: 70vh;
        min-height: 60vh;
    }
    
    .main-video {
        max-height: 70vh;
    }
    
    .delayed-button {
        bottom: 8px;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .headline-section,
    .image-section {
        display: none; /* Hide other content in landscape */
    }
}

/* Very small screens (older phones) */
@media screen and (max-height: 600px) {
    .video-section {
        min-height: 40vh;
        max-height: 50vh;
    }
    
    .video-container {
        max-height: 50vh;
    }
    
    .main-video {
        max-height: 50vh;
    }
    
    .delayed-button {
        bottom: 10px;
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Tall screens (modern phones) */
@media screen and (min-height: 800px) {
    .video-section {
        min-height: 55vh;
        max-height: 70vh;
    }
    
    .video-container {
        max-height: 70vh;
    }
    
    .main-video {
        max-height: 70vh;
    }
}

/* High DPI displays */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    .delayed-button {
        /* Better rendering on retina displays */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Dark mode support (if system prefers) */
@media (prefers-color-scheme: dark) {
    /* Keep light theme for this app */
    .mobile-app {
        background: #ffffff;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .delayed-button {
        animation: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .delayed-button {
        border: 2px solid #000;
    }
}