/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font Face */
@font-face {
    font-family: 'Sitka';
    src: url('assets/fonts/Sitka.ttf') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('assets/fonts/Montserrat-Regular.ttf') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* Base Elements */
html, body {
    width: 100%;
    height: 100%;
    background-color: #000;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: auto;
}

/* Container Layout */
.container {
    position: relative;
    width: 100%;
    height: 100%;
    border: 3px solid #444;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.content-frame {
    position: relative;
    width: 250px;
    height: 190px;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: inline-block;
}

.content-frame video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.content-frame:hover video {
    opacity: 0.8;
}

/* Paused GIF style */
.paused {
    animation-play-state: paused !important;
}

/* Library Component */
.library {
    position: absolute;
    bottom: 5px;
    left: 5px;
    width: 117px;
    height: 106px;
    transform-origin: bottom left;
    overflow: visible;
}

.library img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: bottom left;
}

.library:hover img {
    content: url('assets/images/Library_hovered.png');
    opacity: 0.5;
    width: 140%;
    height: 125%;
    position: absolute;
    left: 5px;
}

/* Newsletter Component */
.newsletter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 118px;
    height: 150px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.newsletter img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.newsletter:hover img {
    content: url('assets/images/Newsletter_Open.png');
    opacity: 0.5;
}

/* Back Button */
.back {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 65px;
    height: 52px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.back:hover img {
    content: url('assets/images/back_hovered.png');
    opacity: 0.5;
}

/* Links Section */
.links {
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding-right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
}

.game-link {
    color: rgb(213, 213, 213);
    text-decoration: underline;
    font-size: 25px;
    line-height: 1.5;
    font-family: 'Sitka';
    cursor: pointer;
}

.game-link:hover {
    color: rgb(168, 166, 166);
}

#gif {
    display: block;
    width: 100%;
}

.gif-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.gif-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Custom Scrollbar */
.links::-webkit-scrollbar {
    width: 15px;
    height: 12px;
}

.links::-webkit-scrollbar-track {
    background-color: #333;
    border-radius: 10px;
}

.links::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 10px;
    border: 3px solid #444;
}

.links::-webkit-scrollbar-thumb:hover {
    background-color: #888;
}

/* Popup */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    border: 2px solid #444;
    padding: 10px 20px;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    text-align: center;
    width: 280px;
    animation: fadeIn 0.2s ease-in-out;
}

.popup p {
    color: #000;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 500;
}

.popup button {
    display: block;
    width: 100%;
    margin: 12px 0;
    padding: 12px;
    border: 2px solid #444;
    cursor: pointer;
    background: repeating-linear-gradient(0deg, #949494 0%, #e6e6e6 100%);
    color: #000;
    font-size: 14px;
    font-family: 'Montserrat';
    border-radius: 10px;
    transition: background 0.3s ease, transform 0.1s, border 0.2s;
}

.popup button:hover {
    transform: scale(1.02);
}

.popup button:active {
    transform: scale(0.98);
}

h3{
    font-family: 'Montserrat';
    color: white;
    margin-top: 10px;
    font-family: 'Montserrat';
    color: white;
    margin-top: 10px;
}

a{
    color: white;
    font-family: 'Sitka';
}

.category-section {
    margin-bottom: 40px;
}

#popup-cancel {
    display: block;
    width: 100%;
    margin-top: 40px;
    padding: 12px;
    cursor: pointer;
    background: linear-gradient(0deg, #000, #0b0b0b);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    font-family: 'Montserrat';
    color: whitesmoke;
    border: 1px solid #bbb;
    transition: background 0.2s, transform 0.1s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -55%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}