:root {
    --bs-body-bg: #fff;
    --bs-body-color: #212529;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #212529;
    --bs-body-color: #f8f9fa;
}

.navbar-light {
    background-color: #f8f9fa !important; /* Light mode background */
    color: #000;
}

.navbar-dark {
    background-color: #343a40 !important; /* Dark mode background */
    color: #fff;
}


html, body {
    height: 100%; /* Ensure the body stretches to full height */
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

footer {
    margin-top: auto; /* Pushes the footer to the bottom of the viewport */
}

/* Game card styles for uniform layout */
.game-card {
    margin-bottom: 20px;
    height: 700px; /* Increased height to fit additional elements */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-cover-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 250px;
}

/* Hover layer stays, but no hover logic needed now */
.hover-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9999; 
    pointer-events: none;
}

.game-cover, .gameplay-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 250px;
    object-fit: cover;
    pointer-events: none; /* Video not interactable directly */
}

/* Default states */
.game-cover {
    z-index: 2;
    opacity: 1;
}

.gameplay-preview {
    z-index: 1;
    opacity: 0;
}

.game-card-body {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Play button styling */
.play-button {
    width:100%;
    height:100%;
    position: absolute;
    top: 50%;
    left:50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 15px;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    transition: background 0.3s ease;
    pointer-events: auto; /* Important: button must be clickable */
    opacity:0;
}

.play-button:hover {
    background: rgba(0, 0, 0, 0.8);
    opacity:0;
}

.game-description {
    height: 80px; /* Adjusted height for description */
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    /*color: #000;*/
    line-height: 1.4;
    /* Updated fade-out effect at the bottom */
    #background-color:#E4E6EB;
    padding-bottom: 10px;
    margin-bottom: 5px; /* Space between description and "Size" */
}
.text-justify {
    text-align: justify;
}
.text-muted {
    margin-bottom: 5px; /* Space between size and read-more */
}
.read-more {
    color: #007bff;
    cursor: pointer;
    text-decoration: none;
    margin-top: auto; /* Align Read more at the bottom */
}
.read-more:hover {
    text-decoration: underline;
}
div#game-catalog .btn {
    margin-top: 10px; /* Space between button and content above */
}

#loadingModal .modal-dialog { text-align: center; }
.pagination { flex-wrap: wrap; }
/* Loading Overlay Styles */
#loadingOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 0;
}
.status-queued {
    color: orange;
    font-weight: bold;
}

.status-Archiving {
    color: blue;
    font-weight: bold;
}

.status-ready {
    color: green;
    font-weight: bold;
}

.status-failed {
    color: red;
    font-weight: bold;
}


.status-ready {
    animation: whoosh 1s ease-in-out;
}

/* Notification Badge Styling */
#download-badge {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    font-size: 0.75rem;
    padding: 0.25em 0.4em;
    border-radius: 50%;
    background-color: #28a745; /* Green background */
    color: white;
}

/* Whoosh Animation */
@keyframes whoosh {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background-color: #28a745;
    }
    50% {
        opacity: 0.7;
        transform: translate(200px, -50px) scale(1.5);
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: #28a745;
    }
    100% {
        opacity: 0;
        transform: translate(400px, -100px) scale(1);
        width: 0;
        height: 0;
        border-radius: 50%;
        background-color: transparent;
    }
}

.whoosh {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #28a745;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    animation: whoosh 1s forwards;
}

/* Existing #download-badge styles... */

#download-badge.increment {
    transform: translate(50%, -50%) scale(1.2);
    background-color: #218838; /* Darker green */
}
.progress {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 5px;
}

.progress-bar {
    height: 100%;
    line-height: 20px;
    font-size: 12px;
    color: #fff;
}
#scrollToTopBtn {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    background-color: #6c757d; /* Bootstrap's secondary color */
    color: white;
    border: none;
    border-radius: 50%;
    padding: 12px 15px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease, transform 0.3s ease; /* Smooth fade and scale */
    opacity: 0; /* Fully transparent by default */
    transform: scale(0.9); /* Slightly scaled down by default */
}

#scrollToTopBtn:focus {
    outline: none; /* Remove default focus outline */
    box-shadow: 0 0 0 4px rgba(108, 117, 125, 0.5); /* Add focus ring for accessibility */
}

#scrollToTopBtn:hover {
    background-color: #5a6268; /* Darker shade for hover */
    transform: scale(1); /* Scale to full size on hover */
}

#scrollToTopBtn.show {
    display: block; /* Show button */
    opacity: 1; /* Fully opaque */
    transform: scale(1); /* Reset scaling */
}


/* Add rounded corners to the cover and modal */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.modal-header img {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.modal-header .close {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); /* Subtle glow for better readability */
}

/* Replace the old image rule */
#gameInfoModal img {
    width: 100%;
    height: auto;
    object-fit: fill !important;
}



/* Refine the title styling */
#gameInfoModal h3 {
    font-size: 1.8rem; /* Slightly larger for better readability */
    margin-bottom: 1rem;
    text-align: center; /* Center aligns the title */
}
.game-info-link{
    text-decoration: none !important; 
    #color:#e8e6e3;
    font-weight:bold;
    text-wrap:nowrap;
}
.game-info-link:hover{
    text-decoration: none !important; 
    font-weight:bold;
    #color:rgb(32, 134, 55);
    text-wrap:nowrap;
}
.modal-body i {
    font-size: 3rem;
}

@keyframes disintegrate {
    0% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-20px);
        filter: blur(2px);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
        filter: blur(5px);
    }
}

.disintegrate {
    animation: disintegrate 1.2s ease-out forwards;
    position: relative;
}

@keyframes particleEffect {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.5);
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: #ff4d4d; /* Customize particle color */
    border-radius: 50%;
    animation: particleEffect 1.2s ease-out forwards;
}
div.container{
    margin-top:75px !important;
}


.switch-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 64px;
    pointer-events: none; /* Prevent interaction */
    z-index: 10; /* Ensure it’s above other elements */
}

.wiiU-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 64px;
    pointer-events: none; /* Prevent interaction */
    z-index: 10; /* Ensure it’s above other elements */
    background:#fff;
}

.playstation-3-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 64px;
    pointer-events: none; /* Prevent interaction */
    z-index: 10; /* Ensure it’s above other elements */
    background:#fff;
}

.list-group-item {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Vertically aligns all items */
    padding: 0.5rem 1rem; /* Adjusts spacing */
    gap: 1rem; /* Adds space between elements */
    justify-content: space-between; /* Ensures spacing between file name, badge/button */
    width: 100%; /* Ensure list items take up full width */
    flex-wrap: wrap; /* Allow content to wrap for nested lists */
}

.collapse {
    width: 100%; /* Ensure collapsible content spans the full width */
    margin-top: 0.5rem; /* Add spacing between the parent and the child content */
}

.collapse.show {
    display: block; /* Ensure content is displayed as a block (not flex) */
}

.list-group-item > .d-flex {
    flex: 1; /* Allow the directory's main content to take up space */
    flex-direction: row; /* Keep directory content aligned horizontally */
}
.card-title {
    max-width: 90%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.file-name {
    max-width: 60%; /* Adjust as needed for layout */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block; /* Ensures proper truncation */
    margin-right: auto; /* Pushes other elements to the right */
    /*font-size:11px !important;
    font-family:verdana !important;*/
}

.badge {
    flex-shrink: 0; /* Prevents shrinking */
    text-align: center; /* Centers the text */
    margin-left: 10px; /* Adds space between badge and file name */
    padding: 0.25rem 0.5rem; /* Adjusts internal spacing */
}

a.btn {
    flex-shrink: 0; /* Prevents button from resizing */
    margin-left: 10px; /* Adds consistent spacing between badge and button */
    padding: 0.25rem 0.75rem; /* Adjusts button padding */
}

a.btn:hover {
    text-decoration: none; /* Removes underline on hover */
    background-color: #007bff; /* Optional: Button hover effect */
    color: #fff; /* Ensures text color remains readable */
}

.list-group-item:hover {
    background-color: #1e1e1e; /* Subtle hover effect for the item */
}

.fa-youtube{
   color: #FF0000 !important;
   background-color:#fff;
}