html {
    scroll-behavior: smooth;
}


/* Fullscreen-like container */

body,
html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    user-select: none;
    max-height: 100vh;
    height: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.video-container {
    position: relative;
    width: 100vh;
    max-width: 600px;
    height: 100%;
    overflow: hidden;
    background: #1a1e31;
    -webkit-tap-highlight-color: transparent;
    /* iOS Safari specific fixes */
    -webkit-overflow-scrolling: touch;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

video {
    width: 100%;
    height: 100%;
    cursor: pointer;
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}


/* iOS specific fixes */

video::-webkit-media-controls {
    display: none !important;
}

video::-webkit-media-controls-enclosure {
    display: none !important;
}

video::-webkit-media-controls-panel {
    display: none !important;
}

video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

video.slide-up {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

video.slide-down {
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0.5;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0.5;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* Control buttons */

.controls {
    position: absolute;
    bottom: 10%;
    right: 15px;
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.control-button {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 15px;
    border-radius: 50%;
    line-height: 0;
}

.cbuttons:hover {
    background: #00000066;
}

.progress-bar-container {
    position: absolute;
    bottom: 55px;
    left: 0;
    width: 100%;
    height: 15px;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.progress-bar {
    width: 0;
    height: 100%;
    background-image: linear-gradient(to right, #ff0000, #ff0046, #ff0081, #ff00c0, #e800ff);
    transition: width 0.1s linear;
}

.reelsfm {
    position: absolute;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 1px;
    background: #00000052;
}

.cbuttons {
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 15px;
    line-height: 0;
    background: #00000000;
    flex: auto;
}

div#viewCount {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #0000003b;
    color: #fff;
    backdrop-filter: blur(100px);
    padding: 6px 15px;
    border-radius: 99px;
    overflow: overlay;
    display: flex;
    gap: 5px;
    align-items: center;
    font-size: 18px;
    font-family: system-ui;
    min-width: 80px;
    justify-content: center;
}

div#viewCount svg,
div#likeCount svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

div#viewCount span,
div#likeCount span,
#viewCountNumber,
#likeCountNumber {
    vertical-align: middle;
}

div#likeCount {
    position: absolute;
    top: 70px;
    right: 20px;
    background: #0000003b;
    color: #fff;
    backdrop-filter: blur(100px);
    padding: 6px 15px;
    border-radius: 99px;
    overflow: overlay;
    display: flex;
    gap: 5px;
    align-items: center;
    font-size: 18px;
    font-family: system-ui;
    min-width: 80px;
    justify-content: center;
}


/* Like button toggle states */

#likeButton .material-icons {
    transition: all 0.3s ease;
}

#likeButton .material-icons:first-child {
    /* filled heart - hidden by default */
    display: none;
    color: #ff0055;
}

#likeButton .material-icons:last-child {
    /* outline heart - shown by default */
    display: block;
    color: white;
}

#likeButton.liked .material-icons:first-child {
    /* filled heart - shown when liked */
    display: block;
}

#likeButton.liked .material-icons:last-child {
    /* outline heart - hidden when liked */
    display: none;
}


/* Double tap like animation (Instagram/Facebook style) */

.like-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    z-index: 1000;
}

.like-animation .material-icons {
    font-size: 100px;
    color: #ff0055;
    filter: drop-shadow(0 0 20px rgba(255, 0, 85, 0.8));
}

.like-animation.animate {
    animation: likePopup 0.8s ease-out;
}

@keyframes likePopup {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}