@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: black;
}
.video-container {
    height: 100vh; /* Full screen height */
    position: relative;
}
.swiper-container {
    height: calc(100% - 80px); /* Adjust for footer height */
}
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}
.media-item {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.media-item video, .media-item img {
    height: 100%;
    width: auto;
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0); /* 完全に透明 */
    z-index: 5;
}
.video-overlay, .side-menu {
    position: fixed;
    z-index: 10;
}
.video-overlay {
    bottom: 80px;
    left: 20px;
    right: 80px; /* Side menu space */
    color: white;
    max-width: calc(100% - 100px); /* Consider left and right margins */
}
.video-overlay h5 {
    margin-bottom: 5px;
    word-wrap: break-word;
}
.video-overlay p {
    margin-bottom: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}
.side-menu {
    right: 20px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.side-menu .btn {
    margin-bottom: 5px; /* Reduce the margin to decrease space between buttons */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.side-menu .btn i {
    font-size: 24px; /* Adjust icon size */
}
.side-menu .btn span {
    margin-top: 2px; /* Decrease space between icon and number */
    font-size: 1rem; /* Adjust the font size as needed */
    line-height: 1;
}
.footer {
    height: 80px; /* Adjust height for gauge space */
    background-color: rgba(0, 0, 0, 0.8);
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 20;
}
.footer .progress-bar-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px; /* Gauge height */
    background-color: rgba(255, 255, 255, 0.2);
}
.footer .progress-bar {
    height: 100%;
    background-color: #ff0050;
    width: 0; /* Set dynamically with JavaScript */
}
.footer .nav-link {
    color: white;
    font-size: 1.5rem;
    position: relative;
}
.footer .nav-link.active {
    color: #ff0050;
}
.footer .nav-link.blink {
    animation: blink 1s infinite;
}
.badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #ff0050; /* Same color as the progress bar */
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    display: none; /* Initially hidden */
}
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 400px;
    background: linear-gradient(to bottom right, #ffe6e6, #ffc6c6, #ffa3a3);
    color: #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 30;
    display: none; /* Initially hidden */
    box-sizing: border-box; /* Added to ensure padding and border are included in the element's total width and height */
    overflow: hidden; /* Hide overflowing content */
}
.popup.show {
    display: block;
    animation: fadeIn 0.5s forwards;
}
.popup.hide {
    animation: fadeOut 0.5s forwards;
    display: none;
}
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.popup-header h5 {
    margin: 0;
}
.popup-close {
    background: none;
    border: none;
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}
.popup-close:hover {
    color: #ff0050;
}
.popup-content {
    margin-top: 10px;
}
.profile-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
    width: 100%;
}
.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
}
.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-info {
    margin-bottom: 10px;
}
.profile-info h6 {
    margin-bottom: 5px;
}
.profile-info p {
    margin: 0;
}
.btn-go-to-page, .btn-register {
    display: block;
    width: calc(100% - 40px); /* Adjust width to fit within container */
    max-width: 90%; /* Ensure button doesn't exceed parent width */
    padding: 10px 20px;
    background-color: #ff0050;
    color: white;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1rem;
    margin: 10px auto 20px auto; /* Center the button and add margin */
    transition: background-color 0.3s, visibility 0.3s;
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
    visibility: hidden; /* Hide button initially */
}
.popup .swiper-slide-active .btn-go-to-page, .popup .profile-slide .btn-register {
    visibility: visible; /* Show button when it's in the active slide */
}
.btn-go-to-page:hover, .btn-register:hover {
    background-color: #e60048;
}

.swiper-pagination {
    position: absolute;
    bottom: 60px; /* Adjust position to create space between pagination and content */
    width: 100%;
    text-align: center;
    z-index: 10;
}
.swiper-pagination-bullet {
    background: #ff0050;
}

/* Green Popup */
.green-popup {
    background: linear-gradient(to bottom right, #e6ffe6, #c6ffc6, #a3ffa3);
}
.green-popup .btn-register {
    background-color: #00cc66;
}
.green-popup .btn-register:hover {
    background-color: #00994d;
}

/* Grey Popup */
.popup-grey {
    background: linear-gradient(to bottom right, #ffffff, #e0e0e0);
}
/* Center the text in the popup */
.popup-content p {
    text-align: center;
    margin-bottom: 20px; /* Add some space between the text and the button */
}

/* Ensure the button is visible and centered */
.popup-grey .btn-register {
    display: block;
    width: calc(100% - 40px); /* Adjust width to fit within container */
    max-width: 90%; /* Ensure button doesn't exceed parent width */
    padding: 10px 20px;
    background-color: #555555;
    color: white;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1rem;
    margin: 0 auto 20px auto; /* Center the button and add margin */
    transition: background-color 0.3s, visibility 0.3s;
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
    visibility: visible; /* Ensure the button is visible */
}

.popup-grey .btn-register:hover {
    background-color: #444444;
}