/* ===================================
   CSS Variables - Design Tokens
   =================================== */
:root {
    --background: #000000;
    --contrast: #ffffff;
    --color-1: #e21f66;
    --blanc: #ffffff;
    --color-2: #c2ff90;
    --dark-bg: #1d1d1f;
}

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark-bg);
    color: var(--contrast);
}

body {
    position: relative;
}

/* ===================================
   Header - Mobile First
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 65px;
    z-index: 100;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 30px;
    max-width: 1440px;
    margin: 0 auto;
    gap: 10px;
}

.header-logo {
    display: block;
    height: 30px;
    width: 129px;
}

.header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 13.5px;
    border: 1.5px solid var(--color-2);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--blanc);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background-color: var(--color-2);
    color: var(--background);
}

/* ===================================
   Slides Container
   =================================== */
.slides-container {
    width: 100%;
    height: 100vh;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.slide-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background);
}

.slide-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-clickable {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}

/* ===================================
   Tutorial Overlay (Mobile Only)
   =================================== */
.tutorial-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.tutorial-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 169px;
    padding: 0 20px;
    width: 228.934px;
}

.tutorial-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tutorial-icon {
    width: 43.084px;
    height: 43.084px;
}

.tutorial-title span {
    font-size: 24px;
    font-weight: 700;
    color: var(--contrast);
    white-space: nowrap;
}

.tutorial-scroll {
    display: flex;
    align-items: center;
    gap: 18px;
}

.scroll-icon {
    width: 31.934px;
    height: 35.075px;
}

.tutorial-scroll p {
    font-size: 20px;
    font-weight: 700;
    color: var(--blanc);
    line-height: normal;
}

.tutorial-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    height: 40px;
    background-color: var(--color-1);
    border-radius: 50px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--blanc);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    z-index: 11;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tutorial-btn:hover {
    background-color: #ff2570;
}

/* ===================================
   Video Info Overlay
   =================================== */
.video-info {
    position: absolute;
    top: 65px;
    left: 0;
    width: 100%;
    height: calc(100% - 65px);
    z-index: 5;
    padding: 20px;
    pointer-events: none;
}

.video-info > * {
    pointer-events: auto;
}

.video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.video-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swiper-icon {
    width: 24px;
    height: 24px;
}

.video-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--contrast);
}

.sound-toggle {
    width: 25.713px;
    height: 19.915px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 6;
    position: relative;
}

.sound-toggle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-name {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 16px;
    font-weight: 700;
    color: var(--blanc);
}

/* ===================================
   Side Icons
   =================================== */
.side-icons {
    position: absolute;
    right: 20px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    z-index: 5;
    pointer-events: none;
}

.side-icons > * {
    pointer-events: auto;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 41px;
    height: 41px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.icon-btn:hover {
    transform: scale(1.1);
}

.icon-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.profile-pic {
    border-radius: 50%;
}

/* ===================================
   Arrow Navigation (Desktop Only)
   =================================== */
.arrow-nav {
    display: none;
    position: fixed;
    /* Position to the right of video with 20px padding */
    left: calc(50% + (((100vh - 84px - 80px) * 0.5524) / 2) + 20px);
    top: calc(84px + (100vh - 84px - 80px) / 2);
    transform: translateY(-50%);
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    z-index: 50;
}

/* ===================================
   Final Modal
   =================================== */
.final-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    width: calc(100% - 40px);
    max-width: 400px;
}

.final-modal-content {
    background-color: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--color-2);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
}

.final-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--blanc);
    margin-bottom: 16px;
}

.final-modal-text {
    font-size: 16px;
    font-weight: 400;
    color: var(--blanc);
    margin-bottom: 24px;
    line-height: 1.4;
}

.final-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background-color: transparent;
    border: 2px solid var(--color-2);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--blanc);
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 21;
    position: relative;
}

.final-modal-btn:hover {
    background-color: var(--color-2);
    color: var(--background);
}

/* ===================================
   Mid Modal (Non-Blocking)
   =================================== */
.mid-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    width: calc(100% - 40px);
    max-width: 400px;
}

.mid-modal-content {
    background-color: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--color-2);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
}

.mid-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--blanc);
    margin-bottom: 16px;
}

.mid-modal-text {
    font-size: 16px;
    font-weight: 400;
    color: var(--blanc);
    margin-bottom: 24px;
    line-height: 1.4;
}

.mid-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background-color: transparent;
    border: 2px solid var(--color-2);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--blanc);
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 21;
    position: relative;
}

.mid-modal-btn:hover {
    background-color: var(--color-2);
    color: var(--background);
}

/* Blur effects for final slide */
.slide-blurred {
    filter: blur(10px);
}

.video-info-blurred,
.side-icons-blurred,
.arrow-nav-blurred {
    filter: blur(5px);
}

/* ===================================
   Footer
   =================================== */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 90;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    display: none;
    padding: 20px 100px;
}

.footer-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    display: block;
    height: 30px;
    width: auto;
}

.footer-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.footer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-copyright {
    font-size: 12px;
    color: var(--contrast);
    text-align: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-rta {
    display: block;
    height: 12px;
}

.footer-rta img {
    height: 12px;
    width: auto;
}

.footer-links a {
    font-size: 12px;
    color: var(--contrast);
    transition: color 0.3s ease;
    line-height: 1;
}

.footer-links a:hover {
    color: var(--color-2);
}

/* ===================================
   Desktop Styles (768px+)
   =================================== */
@media (min-width: 768px) {
    /* Header */
    .header {
        height: 84px;
    }

    .header-container {
        padding: 0 100px;
    }

    .header-logo {
        height: 46px;
        width: 197px;
    }

    .header-btn {
        font-size: 18px;
    }

    /* Hide tutorial on desktop */
    .tutorial-overlay {
        display: none;
    }

    /* Mobile-only slide styling on desktop - hidden via JS, not CSS */
    .slide-mobile-only {
        /* Don't use display:none, let JS handle visibility */
    }

    /* Video Info */
    .video-info {
        top: 84px;
    }

    /* Desktop Video Container */
    .slide-video-wrapper {
        top: 84px;
        left: 50%;
        transform: translateX(-50%);
        /* Full height minus header and footer with padding */
        height: calc(100vh - 84px - 80px);
        /* Maintain aspect ratio (9:16 = 0.5625) */
        width: calc((100vh - 84px - 80px) * 0.5524);
        border: 3px solid var(--color-2);
        border-radius: 10px;
        overflow: hidden;
    }

    .slide-video {
        border-radius: 10px;
    }

    .video-info {
        top: 84px;
        left: 50%;
        transform: translateX(-50%);
        width: calc((100vh - 84px - 80px) * 0.5524);
        height: calc(100vh - 84px - 80px);
    }

    .video-name {
        bottom: 47px;
    }

    /* Side Icons for Desktop - overlap on video on the right side */
    .side-icons {
        right: auto;
        /* Position from left: 50% (center) + half video width - icons position from right edge */
        left: calc(50% + (((100vh - 84px - 80px) * 0.5524) / 2) - 81px);
        top: auto;
        /* Position from top: header + half of video height - half of icons container */
        bottom: calc(84px + ((50vh - 84px - 80px) / 2) - 111px);
        transform: none;
    }

    /* Arrow Navigation */
    .arrow-nav {
        display: flex;
    }

    .arrow-btn {
        width: 49px;
        height: 49px;
        border-radius: 24.5px;
        background-color: var(--color-1);
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 21px 18px;
        transition: all 0.3s ease;
    }

    .arrow-btn:hover {
        background-color: #ff2570;
        transform: scale(1.05);
    }

    .arrow-btn img {
        width: 12px;
        height: 6px;
        object-fit: contain;
    }

    .arrow-up img {
        transform: rotate(0deg);
    }

    .arrow-down img {
        transform: rotate(180deg);
    }

    .arrow-btn[style*="opacity: 0.3"] {
        opacity: 0.5;
    }

    /* Desktop Final Modal */
    .final-modal {
        max-width: 480px;
        width: 480px;
    }

    .final-modal-content {
        padding: 60px 50px;
    }

    .final-modal-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .final-modal-text {
        font-size: 16px;
        margin-bottom: 20px;
    }

    /* Desktop Mid Modal */
    .mid-modal {
        max-width: 480px;
        width: 480px;
    }

    .mid-modal-content {
        padding: 60px 50px;
    }

    .mid-modal-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .mid-modal-text {
        font-size: 16px;
        margin-bottom: 20px;
    }

    /* Desktop gradient background - Fixed */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 23.562%, rgba(226, 31, 102, 0.3) 102.2%);
        pointer-events: none;
        z-index: 0;
    }

    .slide-video-wrapper {
        z-index: 1;
        cursor: pointer;
    }

    .slide-clickable {
        z-index: 2;
    }

    .video-info,
    .side-icons,
    .final-modal {
        z-index: 10;
    }

    /* Footer */
    .footer {
        display: block;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .footer-info {
        flex-direction: row;
        gap: 20px;
    }

    .footer-copyright {
        font-size: 14px;
    }

    .footer-links {
        gap: 20px;
    }

    .footer-links a {
        font-size: 14px;
    }
}

/* ===================================
   Large Desktop (1440px+)
   =================================== */
@media (min-width: 1440px) {
    .arrow-nav {
        /* Keep arrows to the right of video */
        left: calc(50% + (((100vh - 84px - 80px) * 0.5524) / 2) + 20px);
    }

    .side-icons {
        /* Icons in overlap on the right side of video */
        left: calc(50% + (((100vh - 84px - 80px) * 0.5524) / 2) - 81px);
    }
}

@media (max-width: 1024px) and (orientation: landscape) {
    .side-icons {
         display: none;
    }
}

@media (max-width: 1024px) {
    .footer {
        display: none;
    }
}

/* ===================================
   Animations & Transitions
   =================================== */
.slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}