body.modal-open {
    overflow: hidden;
    padding-right: 0 !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

.glass-panel-gamecard {
    display: flex;
    flex-direction: column;
    background: var(--bg-light-overlay);
    backdrop-filter: var(--backdrop-blur);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) auto;
    box-shadow: var(--shadow-glass-strong);
    width: 900px;
    min-height: 80vh;
}

.button-glass-hamburger {
    width: 30px;
    height: 30px;
    background-color: var(--game-button-bg-1);
    border-radius: var(--border-radius-round);
    padding: var(--spacing-1) var(--spacing-2);
    border: none;
    cursor: pointer;
    margin-bottom: var(--spacing-xs);
    opacity: 1;
    position: relative;
    left: 0px;
    top: 0px;
    transition: background-color var(--transition-fast);
}

.button-glass-hamburger:hover {
    background-color: var(--game-button-bg-2);
}

.game-card-topq {
    display: flex;
    flex-direction: row;
    min-height: 730px;
}

.game-card-meta {
    display: flex;
    flex-direction: column;
    color: var(--text-light);
    background-color: var(--game-card-brown);
    text-shadow: 5px 5px 5px var(--bg-dark-tertiary);
    padding: var(--spacing-lg);
    padding-right: 40px;
    position: relative;
}

.favorite-btn {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--shadow-dark-strong);
    border: 2px solid var(--color-black-pure);
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 10;
}

.favorite-btn i {
    font-size: 20px;
    color: var(--text-white);
    transition: color var(--transition-normal);
}

.favorite-btn:hover {
    transform: scale(1.1);
    background: var(--bg-dark-strong);
}

.favorite-btn.favorited i {
    color: var(--color-pink-favorite);
}

.favorite-btn.processing {
    pointer-events: none;
    opacity: 0.7;
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--spacing-sm);
    line-height: normal;
    box-shadow: 4px 4px 8px 0 var(--bg-dark-tertiary), var(--game-shadow-standard);
    border: 1px solid var(--color-black-darker);
    position: relative;
}

.game-files {
    display: flex;
    flex-direction: column;
    color: var(--text-light);
    background-color: var(--game-card-brown);
    text-shadow: 5px 5px 5px var(--bg-dark-tertiary);
    padding: var(--spacing-lg);
    padding-right: 40px;
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--spacing-sm);
    line-height: normal;
    box-shadow: 4px 4px 8px 0 var(--bg-dark-tertiary), var(--game-shadow-standard);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-black-darker);
    position: relative;
}

.game-card-downloads {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: var(--game-card-brown-dark);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    border: 1px solid var(--color-black-pure);
    margin-top: auto;
    box-shadow: 4px 4px 8px 0 var(--bg-dark-tertiary), var(--game-shadow-standard);
    justify-content: space-between;
}


.button-glass-download {
    padding: var(--spacing-sm) var(--spacing-xl);
    background: var(--game-download-bg);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: transform var(--transition-normal);
    font-size: 1rem;
    color: var(--text-white);
    border: 1px solid var(--border-light-strong);
    margin: var(--spacing-xs);
    text-decoration: none;
    width: 100%;
}

.button-glass-play {
    padding: 1px 8px;
    background: var(--game-info-bg);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: transform var(--transition-normal);
    font-size: 1rem;
    color: var(--text-white);
    border: 1px solid var(--border-light-strong);
    margin: var(--spacing-xs);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.button-glass-extras {
    padding: 8px 12px;
    background: var(--bg-light-overlay);
    border: 1px solid var(--border-light-strong);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 10px;
    user-select: none;
}

.button-glass-extras:hover {
    background: var(--bg-light-overlay-hover);
    border-color: var(--border-white-40);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--container-glass-primary);
}

.button-glass-extras:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px var(--bg-dark-tertiary);
}

.download-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
}


.game-card-links {
    position: absolute;
    top: 50%;
    right: var(--spacing-sm);
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 5px;
}

.game-link-icon-container {
    width: 24px;
    height: 24px;
}

.game-link-icon-container .game-link-icon {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.game-link-icon-container .game-link-icon {
    color: var(--text-muted);
    text-shadow: var(--shadow-text);
    transition: color 0.2s ease;
}

.game-link-icon-container .game-link-icon:hover {
    color: var(--text-white);
}

pre {
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    word-wrap: break-word;
}

.modal-details {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-dark-30);
}


.modal-dialog {
    margin-top: 50px !important;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.game-card-links:empty {
    display: none;
}

.game-name {
    flex-grow: 1;
    margin-left: 15px;
}

.game-card-gamename {
    display: flex;
    text-shadow: 3px 3px 5px var(--bg-dark-strong);
    width: 800px;
}

.game-card-size {
    border: 1px solid var(--color-gray-ccc);
    font-size: small;
    border-radius: 10px;
}

.game-card-q1 {
    display: block;
    justify-content: flex-start;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 400px;
    margin: 10px;
}

.game-card-q2 {
    display: flex;
    flex-direction: column;
    width: 500px;
    margin: 10px;
    justify-content: space-between;
    height: 100%;
}

.game-card-q3 {
    display: flex;
    flex-direction: column;
    width: 400px;
    margin: 10px;
    justify-content: space-between;
    height: 100%;
}

.game-card-text-summary {
    background-color: var(--color-gray-light-summary);
    color: var(--color-black-pure);
    border-radius: var(--border-radius-lg);
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 20px;
    padding-right: 20px;
    font-size: 17px;
    line-height: 1.2;
    border: 1px solid var(--color-black-pure);
    box-shadow: 4px 4px 8px 0 var(--bg-dark-tertiary), var(--game-shadow-standard);
    text-align: justify;
}

.game-card-labels {
    color: var(--text-light);
    text-shadow: 5px 5px 5px var(--bg-dark-strong);
    font-size: 18px;
    margin-bottom: 5px;
    margin-top: 5px;
    margin-right: 15px;
}

.game-card-labels-rating {
    color: var(--text-light);
    text-shadow: 5px 5px 5px var(--bg-dark-strong);
    font-size: 18px;
    margin-bottom: 5px;
    margin-top: 5px;
}

.summary-modal {
    display: none;
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--bg-dark-secondary);
}

.summary-modal-content {
    background-color: var(--color-black-darkest);
    margin: 25% auto;
    padding: 40px;
    border: 1px solid var(--color-gray-888);
    width: 75%;
    border-radius: var(--border-radius-lg);
    line-height: 1.3;
    font-size: larger;
    text-align: justify;
}

.summary-close {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.summary-close:hover,
.summary-close:focus {
    color: var(--color-black-pure);
    text-decoration: none;
    cursor: pointer;
}

.images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.game-image {
    width: 100%;
    height: auto;
    border: 1px solid var(--color-gray-ccc);
}

.game-card-coverimage {
    display: block;
    border-radius: var(--border-radius-lg);
    width: 100%;
    margin-bottom: var(--spacing-sm);
}

.game-card-coverimage img {
    box-shadow: 4px 4px 8px 0 var(--bg-dark-tertiary), var(--game-shadow-standard);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-black-darker);
}

.rating-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: var(--spacing-sm);
    border-radius: 5px;
    gap: 8px;
}

.rating-row {
    display: flex;
    flex-direction: column;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 3px;
}

.rating-bar {
    height: 20px;
    max-width: 100px;
    min-width: 20px;
    border-radius: 10px;
    background: linear-gradient(to right, #ff4444, #ffaa44, #44ff44);
    box-shadow: 0 2px 4px var(--container-glass-primary);
    border: 1px solid var(--border-light);
}

.rating-value {
    color: var(--text-light);
    font-size: 14px;
    font-weight: bold;
    text-shadow: var(--shadow-text-light);
    min-width: 50px;
}

.emptyrating {
    color: var(--text-muted);
    font-style: italic;
    font-size: 14px;
    text-shadow: var(--shadow-text-light);
}

.game-card-chips-list {
    list-style-type: none;
    padding: 0;
    margin: 0px;
}

.chip-detailspage {
    display: inline-block;
    padding: 5px 10px;
    margin-top: 5px;
    margin-right: 5px;
    background-color: var(--game-card-brown-dark);
    border-radius: 25px;
    text-shadow: 5px 5px 5px var(--bg-dark-strong);
    border: 1px solid var(--color-black-pure);
    text-decoration: none;
    color: var(--text-white);
}

.chip-size {
    display: inline-block;
    padding: 5px 10px;
    padding-top: 10px;
    margin-top: 5px;
    margin-right: 5px;
    background-color: var(--game-card-brown-dark);
    border-radius: var(--border-radius-lg);
    text-shadow: 5px 5px 5px var(--bg-dark-strong);
    text-size: 100px;
    border: 1px solid var(--color-black-pure);
}

.flex-row-horiz {
    display: flex;
    flex-direction: row;
}

.flex-col-vertic {
    display: flex;
    flex-direction: column;
}

/* Screenshot Gallery */
.screenshot-gallery {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0;
    margin-top: 5px;
    clear: both;
}

.screenshot-image {
    width: 160px;
    height: 90px;
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

.screenshot-image:hover {
    transform: scale(1.1);
}

/* Videos Row */
.game-videos-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding: 20px 0;
}

.game-video {
    flex: 0 0 auto;
    width: 560px;
    height: 315px;
}



/* Ensure modal content is properly positioned */


/* Image modal specific styling */
.image-modal .modal-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0;
    width: 95%;
    max-width: 1600px;
    height: auto;
    max-height: 95vh;
    margin: auto;
    background-color: transparent;
    box-sizing: border-box;
    z-index: 1051;
}

.close {
    color: var(--text-white);
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 40px;
    font-weight: bold;
    z-index: 1052;
    cursor: pointer;
    text-shadow: 0 0 5px var(--color-black-pure);
}

.screenshot-browser-image {
    max-width: 100%;
    max-height: 100vh;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: fixed;
    top: 50%;
    width: auto;
    height: auto;
    padding: 16px;
    margin-top: -50px;
    color: var(--text-white);
    font-weight: bold;
    font-size: 20px;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: var(--shadow-dark);
    text-shadow: 0 0 5px var(--color-black-pure);
    -webkit-user-select: none;
}

/* Position the "next button" to the right */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
    background-color: var(--bg-dark-strong);
}

/* NFO Button */
.nfo-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    margin-top: 10px;
    background: var(--bg-light-overlay);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-light-strong);
    user-select: none;
}

.nfo-button:hover {
    background: var(--bg-light-overlay-hover);
    border-color: var(--border-white-40);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--container-glass-primary);
}

.nfo-button .nfo-icon {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 4px;
    transition: color var(--transition-normal);
}

.nfo-button:hover .nfo-icon {
    color: var(--text-white);
}

.nfo-button .nfo-text {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--transition-normal);
}

.nfo-button:hover .nfo-text {
    color: var(--text-white);
}

.nfo-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px var(--bg-dark-tertiary);
}

/* NFO Modal */
.modal-nfo {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark-30);
    justify-content: center;
    align-items: center;
}

.modal-nfo-content {
    background: var(--bg-light-overlay);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 0;
    margin: 2rem auto;
    box-shadow: 4px 4px 8px 0 var(--bg-dark-tertiary), var(--game-shadow-standard);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-nfo-header {
    background-color: var(--game-card-brown);
    color: var(--text-light);
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid var(--color-dark-333);
}

.modal-nfo-header h3 {
    margin: 0;
    text-shadow: var(--shadow-text);
}

.modal-nfo-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
    color: var(--text-white);
    background: var(--bg-dark-40);
    border-radius: 0 0 10px 10px;
}

.modal-nfo-body pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Consolas', 'Courier New', Courier, monospace;
    line-height: 1.4;
}

.modal-nfo .close {
    position: absolute;
    top: var(--spacing-sm);
    right: 15px;
    color: var(--text-white);
    font-size: 28px;
    font-weight: bold;
    z-index: 1052;
    cursor: pointer;
    text-shadow: 0 0 5px var(--color-black-pure);
}

.modal-nfo .close:hover,
.modal-nfo .close:focus {
    color: var(--color-gray-ccc);
    text-decoration: none;
}

/* Extras Modal - Custom Implementation */
.modal-extras {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark-30);
    justify-content: center;
    align-items: center;
}

.modal-extras-content {
    background: var(--bg-light-overlay);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 0;
    margin: 2rem auto;
    box-shadow: 4px 4px 8px 0 var(--bg-dark-tertiary), var(--game-shadow-standard);
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-extras-header {
    background-color: var(--game-card-brown);
    color: var(--text-light);
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid var(--color-dark-333);
}

.modal-extras-header h3 {
    margin: 0;
    text-shadow: var(--shadow-text);
}

.modal-extras-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
    color: var(--text-white);
    background: var(--bg-dark-40);
    border-radius: 0 0 10px 10px;
}

.extras-tabs {
    display: flex;
    border-bottom: 2px solid var(--color-dark-333);
    margin-bottom: 20px;
}

.extras-tab-button {
    background: transparent;
    border: none;
    color: var(--color-gray-ccc);
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition-normal);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.extras-tab-button:hover {
    color: var(--text-white);
    background: var(--bg-light-overlay);
}

.extras-tab-button.active {
    color: var(--text-white);
    border-bottom-color: var(--btn-info-hover);
    background: var(--bg-light-overlay);
}

.extras-tab-content {
    display: none;
}

.extras-tab-content.active {
    display: block;
}

.extras-single-title {
    margin: 0 0 20px 0;
    color: var(--text-white);
    text-shadow: var(--shadow-text);
    font-size: 24px;
}

.extras-tab-content.single-tab {
    padding-top: 0;
}

.extras-table {
    width: 100%;
    color: var(--text-white);
}

.extras-table td {
    padding: 10px;
    border-bottom: 1px solid var(--color-gray-888);
    text-align: left;
    font-weight: normal;
}

.extras-table td:hover {
    background: var(--bg-light-overlay);
}

.extras-table .file-name {
    margin-left: 10px;
}

.extras-table .file-size {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-left: 10px;
}

.extras-table a {
    color: var(--text-white);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.extras-table a:hover {
    color: var(--btn-info-hover);
}

/* Override Bootstrap table styling for extras modal */
.extras-table.table {
    background-color: transparent !important;
    color: var(--text-white) !important;
}

.extras-table.table tbody,
.extras-table.table tr,
.extras-table.table th,
.extras-table.table td {
    background-color: transparent !important;
    border-color: var(--color-gray-888) !important;
}

.extras-table.table-hover tbody tr:hover {
    background-color: var(--bg-light-overlay) !important;
    color: var(--text-white) !important;
}

/* Make file icons white in extras modal */
.extras-table i.fas {
    color: var(--text-white);
}

.modal-extras .close {
    position: absolute;
    top: var(--spacing-sm);
    right: 15px;
    color: var(--text-white);
    font-size: 28px;
    font-weight: bold;
    z-index: 1052;
    cursor: pointer;
    text-shadow: 0 0 5px var(--color-black-pure);
}

.modal-extras .close:hover,
.modal-extras .close:focus {
    color: var(--color-gray-ccc);
    text-decoration: none;
}


.style1 {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}

.inline-form {
    display: inline;
}

@keyframes bounceWiggle {
    0% { transform: translateY(0) translateX(0) rotate(0deg); }
    15% { transform: translateY(-15px) translateX(3px) rotate(3deg); }
    30% { transform: translateY(-7px) translateX(-2px) rotate(-2deg); }
    45% { transform: translateY(-4px) translateX(1px) rotate(1deg); }
    60% { transform: translateY(-2px) translateX(-1px) rotate(-1deg); }
    75% { transform: translateY(-1px) translateX(0) rotate(0deg); }
    100% { transform: translateY(0) translateX(0) rotate(0deg); }
}

.bounce-wiggle {
    animation: bounceWiggle 1s ease-out;
}
