*, ::after, ::before {
    box-sizing: border-box;
}
body, html {
    height: 100%;
    margin: 0;
    overflow: hidden;
}
.h-vh-100 {
    height: 100dvh;
    box-sizing: border-box;
    scrollbar-width: none;
}
a {
    color: #fff;
    text-decoration: none;
}

a:hover {
    color: #fff;
    text-decoration: none;
}
.product-name {
    width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block; /* Để width hoạt động đúng */
}
.video-container {
    background-color: #000;
    padding: 0;
    position: relative;
    overflow: visible;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.back-home {
    display: none;
}
.bottom-left .user-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.bottom-left-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
}

.bottom-left-description {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 5px 10px;
}
.bottom-left-description .read-more {
    margin-left: auto;
    order: 2;
}

.bottom-left-description .description {
    flex: 1;
    order: 1;
}
.bottom-left .description {
    flex: 1;
    font-size: 12px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
}

.info-panel .bottom-left-description .description, .bottom-left-description .description {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bottom-left .read-more {
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.bottom-left img.icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
}

.bottom-left a {
    color: white;
    font-weight: 500;
    font-size: 12px;
}

.bottom-left-product {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    font-size: 10px;
    font-weight: normal;
    color: #ccc;
    width: 100%;
}
.bottom-left-product-img {
    width: 34px;
    height: 34px;
}
.bottom-left-product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px 0 0 10px;
}
.bottom-left-product-info {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 0 5px;
}
.bottom-left-product-info-social {
    display: flex;
    align-items: center;
    gap: 5px;
}
.bottom-left-product-info-social img {
    width: 14px;
    border-radius: 5px;
}
.bottom-left.expanded {
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    border-radius: 0 0 10px 10px;
    z-index: 1;
}

.bottom-left.expanded .bottom-left-description {
    flex-direction: column;
    align-items: flex-start;
}

.bottom-left.expanded .bottom-left-description .description {
    color: #fff;
}

.bottom-left.expanded .description {
    white-space: normal;
    overflow-y: auto;
    max-height: 150px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bottom-left.expanded .description::-webkit-scrollbar {
    display: none;
}

.bottom-left.expanded .user-info a {
    color: #fff;
}

.top-center {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    background-color: #00000075;
    color: #fff;
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .2);
}

.top-center > div {
    flex: 1;
    text-align: center;
    position: relative;
}

.top-center > div:first-child {
    flex: 2;
}

.top-center > div:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 50%;
    background-color: #ccc;
}

.icon-column .icon {
    position: relative;
    cursor: pointer;
}

.icon-column .icon img {
    width: 50px;
    height: 50px;
    border-radius: 5px;
}

.avatar, .heart-number, .comment-number, .gift-number, .user_number {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.avatar .plus {
    font-size: 14px;
    font-weight: bold;
    z-index: 1;
    background-color: red;
    color: white;
    border: 1px solid #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -10px;
}

.heart-icon {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #fff;
}

.heart-icon.liked {
    color: red;
}

.heart-count, .comment-count, .comment-date, .gift-count, .user-count {
    font-size: 12px;
}

.menu-icon img {
    width: 20px;
    margin: 10px 0;
}

.completed-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    top: 0;
    left: -15px;
    transform: translateY(-50%);
}

.sound-controls, .social-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, .5);
    color: #fff;
    border: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, .3);
}

.play-button i {
    line-height: 1;
}

.hidden {
    display: none;
}

.horizontal-line {
    border-top: 1px solid #ccc;
    margin: 10px 0;
}

.menu_left a, .footer a, .view-event a {
    color: #000;
}

.footer {
    position: absolute;
    bottom: 0;
    padding: 10px;
    color: #000;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.comment {
    display: flex;
    gap: 10px;
}

.comment .comment-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.comment .comment-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.comment .comment-header {
    font-weight: bold;
}

.comment .comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-reply {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6c757d;
    cursor: pointer;
}

.comment-level-2 {
    margin-left: 40px;
}

.comment-input {
    display: flex;
    align-items: center;
}

.comment-input-field {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
}

.comment-submit-button {
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
}

.comment-submit-button:hover {
    background-color: #0056b3;
}

.comment-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.comment-group {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 5px;
}

.comment-group i {
    margin-right: 5px;
}

.comment-text {
    margin-left: 5px;
    font-size: 12px;
}

.comment-divider {
    flex: 1;
    border: none;
    border-top: 1px solid #ccc;
}

.comment-body i {
    font-size: 14px;
    color: #000;
    background: #ddd;
    height: 30px;
    width: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.event-container {
    position: relative;
    width: 100%;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.event-item {
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    margin-bottom: 20px;
}

.event-image-container {
    overflow: hidden;
    position: relative;
}

.event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-title-overlay {
    background: rgba(0, 0, 0, .4);
    width: 100%;
    text-align: left;
    bottom: 0;
    display: flex;
    align-items: center;
}

.event-title-overlay h5 {
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: inline-block;
}

.event-location-info {
    flex-grow: 1;
    margin-left: 15px;
    font-size: 14px;
    width: 90%;
}

.event-location-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: inline-block;
}

.event-date {
    font-size: 14px;
}

.participant-avatar {
    width: 30px;
    height: 30px;
    margin-right: 5px;
    object-fit: cover;
}

.view-event {
    height: 100vh;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.view-event::-webkit-scrollbar {
    display: none;
}

.comments-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 100px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.comments-section::-webkit-scrollbar {
    display: none;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.comments-list::-webkit-scrollbar {
    display: none;
}
.popup-body {
    flex: 1;
    overflow-y: auto;
}
.popup-footer {
    display: flex;
    align-items: center;
}

.popup-footer input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
}

.popup-footer button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
}

.popup-footer button:hover {
    background-color: #0056b3;
}

.menu-left-comment {
    position: relative;
    height: 100vh;
    flex-shrink: 0;
}

.menu-tab-comment {
    z-index: 1;
    position: absolute;
    background: #fff;
    width: 100%;
    padding-bottom: 10px;
}

.nav-tabs {
    width: fit-content;
    border-bottom: none;
}

.nav-link {
    display: block;
    padding: 10px;
    color: #555;
}

.nav-tabs .nav-link:hover {
    color: #007bff;
}

.nav-tabs .nav-link.active {
    color: #5e72e4;
    border-color: #5e72e4;
    border-bottom: 2px solid #5e72e4;
    border-top: none;
    border-left: none;
    border-right: none;
    background-color: transparent;
}

.event-flex-container, .car-flex-container {
    background: #5e72e4;
    padding: 10px;
    color: #fff;
    font-weight: 700;
    border-radius: 0 0 5px 5px;
}

.car-flex-container {
    position: sticky;
    z-index: 1001;
}

.event-flex-container i, .car-flex-container i {
    color: #fff;
}

.car-title-overlay h5, .event-title-overlay h5 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: inline-block;
}

.car-location-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: inline-block;
}

.car-text span {
    font-size: 14px;
}

.map-icon {
    font-size: 24px;
    color: #5e72e4;
}

.custom-icon {
    border: 1px solid #fff;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    top: -48px;
}
.vertical-range {
    width: 8px;
    height: 100%;
    appearance: none;
    -webkit-appearance: none;
    writing-mode: vertical-lr;
    direction: rtl;
    margin-right: 20px;
    border-radius: 5px;
    background: transparent;
}

.vertical-range::-webkit-slider-thumb,
.vertical-range::-moz-range-thumb {
    width: 0;
    height: 0;
    background: transparent;
}

.list-group-item {
    height: calc(100% / 10);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    border-radius: 5px;
}

.all-video {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}
.spinner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    text-align: center;
    z-index: 10;
    display: none;
}
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: none;
}

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

.lazy-video[data-src] {
    display: block;
}

.lazy-video {
    display: none;
}
.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 2;
}
.video-progress-filled {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.1s linear;
}
.video-time {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: white;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 5px;
    border-radius: 3px;
}
.share-icon {
    cursor: pointer;
    position: relative;
}
.share-popup-info {
    width: max-content;
}
.share-popup {
    position: absolute;
    right: 50px;
    background: #fff;
    border-radius: 8px;
    z-index: 10;
    min-width: 150px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.copy-option, .fb-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    color: #000;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-option:hover, .fb-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.copy-option i {
    font-size: 14px;
}

.fb-option i {
    font-size: 18px;
}
.video-gift {
    position: absolute;
    width: 60px;
    height: 60px;
    cursor: pointer;
    pointer-events: auto;
    animation: bounce 1s infinite;
}
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    color: white;
    font-size: 16px;
    transition: opacity 0.3s ease;
}
#image-container {
    width: 300px;
    height: 25px;
    position: relative;
    overflow: hidden;
}
#image-container img {
    width: 50px;
    position: absolute;
    left: 0;
    transition: left 0.3s ease;
}
#loading-progress {
    width: 300px;
    height: 10px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
}
#loading-progress #progress-bar {
    width: 0%;
    height: 100%;
    background: #fd7e14;
    transition: width 0.3s ease;
}
#loading-text {
    margin-top: 10px;
    max-width: 250px;
    min-width: 150px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    padding: 10px;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.gift-header {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
}
.gift-header span {
    font-size: 14px;
    font-weight: 700;
}
.treasure-info {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}
.gift-body {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
#giftBody {
    position: relative;
    overflow: visible;
}
.distance-all {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    font-size: 14px;
}
.distance-all img {
    width: 36px;;
}
.distance-all span {
    font-size: 14px;
    font-weight: 400;
}
#treasureCanvas {
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
}
#canvas-overlay {
    pointer-events: none;
}
@media (min-width: 768px) {
    .all-container {
        display: grid;
        grid-template-columns: 1fr auto auto;
        align-items: center;
        align-content: center;
        height: 100%;
        justify-content: center;
    }

    .video-container {
        height: 90vh;
        width: calc(90vh * 9 / 16);
        border-radius: 10px;
        box-shadow: rgba(50, 50, 93, .25) 0 13px 27px -5px, rgba(0, 0, 0, .3) 0 8px 16px -8px;
        position: relative;
        overflow: hidden;
        justify-self: center;
        max-width: 100%;
    }

    video {
        border-radius: 10px;
    }

    .view-video {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
    }
    .sound-controls {
        position: relative;  /* Không absolute trên laptop */
        top: auto;
    }
        
    .control-btn {
        display: block;  /* Hiện mũi tên trên laptop */
    }
        
    .sound-icon {
        
    }
    .icon-column {
        width: auto;
        justify-self: end;
        max-width: 100%;
        padding: 0 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        height: 100%;
    }

    .video-container .bottom-left {
        display: none;
    }

    .info-panel .bottom-left {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 0 10px;
    }

    .info-panel {
        width: 100%;
        max-width: 100%;
        justify-self: start;
        overflow: hidden;
        flex: 1;
        height: 90vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }
    .bottom-left-product-info-social {
        
    }
    .bottom-left.expanded {
        position: absolute;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 0;
        color: #fff;
        z-index: 1;
        box-sizing: border-box;
    }

    .info-panel .bottom-left-description {
        overflow: hidden;
    }

    .bottom-left .description, .bottom-left a {
        color: #000;
        font-size: 16px;
    }

    .bottom-left-product {
        color: #fff;
        background: #fd7e14;
    }

    .bottom-left.expanded .user-info-name {
        color: #fff;
    }

    .icon-column .icon-column-avatar {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .icon-column .icon-column-avatar img {
        width: 40px;
        height: 40px;
    }

    .popup-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, .5);
        z-index: 2;
        display: none;
    }

    .popup-content {
        position: fixed;
        bottom: 0;
        right: 0;
        width: 500px;
        height: 85vh;
        background: #fff;
        border-radius: 10px 10px 0 0;
        box-shadow: 0 0 10px rgba(0, 0, 0, .2);
        z-index: 3;
        padding: 20px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow-y: scroll;
        scrollbar-width: none;
    }

    .popup-content::-webkit-scrollbar {
        display: none;
    }

    .comments-section {
        padding-bottom: 50px;
    }

    .button-reg-event {
        position: absolute;
        bottom: 50px;
        width: 100%;
        background: #fff;
        height: 60px;
        margin-left: -15px;
        padding: 5px;
        border-top: 1px solid #ddd;
        z-index: 1;
    }

    .icon i, .menu-icon, .sound-icon, .control-btn {
        background: #ddd;
        height: 40px;
        width: 40px;
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        font-size: 20px;
    }

    .menu-icon-img {
        content: url('/uploads/bio/treasure_black.svg');
        width: 20px;
    }

    .icon-column a, .heart-icon, .heart-count {
        color: #000;
    }
}

@media (max-width: 767px) {
    .back-home {
        display: block;
        position: absolute;
        color: #fff;
        top: 10px;
        left: 10px;
        z-index: 1;
        font-size: 20px;
    }
    .back-home a, .back-home a:hover {
        color: #fff;
    }
    .view-video {
        padding: 0;
    }
    .control-btn {
        display: none;
    }
    .sound-icon {
        color: #fff;
    }
    .bottom-left {
        position: fixed;
        bottom: 50px;
        width: 100%;
        padding: 5px;
        color: white;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 5px;
    }
    .bottom-left .bottom-left-avatar {
        display: block;
    }
    .info-panel {
        display: none !important;
    }
    .bottom-left-product {
        width: max-content;
    }
    .icon-column {
        position: absolute;
        right: 15px;
        top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        height: 100%;
        padding: 15px 0 50px 0;
    }
    .icon-column .icon-column-avatar {
        display: none;
    }
    .social-controls {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: 15px;
    }
    .popup-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, .5);
        z-index: 2;
        overflow: hidden;
    }
    .popup-content {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 85vh;
        background: #fff;
        border-radius: 10px 10px 0 0;
        padding: 10px;
        display: flex;
        flex-direction: column;
        overflow-y: scroll;
        scrollbar-width: none;
    }
    .popup-content::-webkit-scrollbar {
        display: none;
    }
    .heart-count {
        color: #fff;
    }
    .button-reg-event {
        position: absolute;
        bottom: 50px;
        width: 100%;
        background: #fff;
        height: 110px;
        margin-left: -15px;
        padding: 5px;
        border-top: 1px solid #ddd;
        z-index: 1;
    }
    .modal-dialog {
        height: auto;
        padding: 20px;
        margin-bottom: 0;
    }
    .modal-content {
        border-radius: 5px;
    }
    .icon-column .icon {
        color: #fff;
    }
    .menu-icon-img {
        content: url('/uploads/bio/treasure.svg');
        width: 20px;
    }
    main {
        display: flex;
        flex-direction: column;
        height: 100vh;
    }
    .header-wrapper {
        flex: 1;
        overflow: hidden;
        display: flex;
    }
    .nav-wrapper {
        flex-shrink: 0;
    }
    .video-mobile, .all-container, .video-container {
        height: 100%;
    }
    .video-time {
        bottom: -3px;
        font-size: 10px;
        background: none;
        padding: 0;
    }
    .share-popup {
        top: 50%;
        right: 24px;
    }
    .badge-danger {
        top: 32px !important;
        padding: 5px !important;
        font-size: 12px !important;
        flex-direction: column !important;
        justify-content: space-around !important;
        align-items: center !important;
    }
    .badge-danger::after {
        bottom: 0 !important;
        border-bottom: 0 !important;
        border-top: 0 !important;
    }
}