body {
    background-color: var(--background-color);
    background-image: var(--background-image);
    background-size: cover;
    background-position: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: var(--text-color);
}

:root {
    --background-color: #1e1e1e;
    --text-color: #f0f0f0;
    --window-background-color: #2e2e2e;
    --title-bar-background-color: #3a3a3a;
    --button-background-color: #3a3a3a;
    --button-hover-background-color: #4a4a4a;
    --link-color: #66b2ff;
    --link-hover-color: #3399ff;
    --background-image: none;
}

.light-mode {
    --background-color: #f0f0f0;
    --text-color: #1e1e1e;
    --window-background-color: #ffffff;
    --title-bar-background-color: #e0e0e0;
    --button-background-color: #e0e0e0;
    --button-hover-background-color: #d0d0d0;
    --link-color: #007aff;
    --link-hover-color: #005bb5;
}

.window {
    width: var(--window-width, 800px);
    height: var(--window-height, 600px);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background-color: var(--window-background-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.title-bar {
    display: flex;
    align-items: center;
    background-color: var(--title-bar-background-color);
    padding: 8px 12px;
    border-bottom: 1px solid #444;
}

.buttons {
    display: flex;
    gap: 8px;
}

.buttons div {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.close {
    background-color: #ff5f57;
}

.minimize {
    background-color: #ffbd2e;
}

.maximize {
    background-color: #28c840;
}

.title {
    flex-grow: 1;
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
}

.main-content {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

.sidebar {
    width: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-right: 1px solid #444;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    text-decoration: none;
    color: var(--link-color);
    font-weight: 500;
}

.category-list a:hover {
    text-decoration: underline;
    color: var(--link-hover-color);
}

.content {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100% - 40px); /* Adjust based on padding and other elements */
}

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

.game-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.game-list li {
    margin-bottom: 10px;
}

.game-list a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background-color: var(--button-background-color);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, box-shadow 0.3s;
    width: 80px; /* Adjusted width to fit content */
    text-align: center;
}

.game-list a img {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
    border-radius: 12px;
}

.game-list a:hover {
    background-color: var(--button-hover-background-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.settings-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.settings-toggle button {
    padding: 10px;
    background-color: var(--button-background-color);
    border: none;
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.3s;
}

.settings-toggle button:hover {
    background-color: var(--button-hover-background-color);
}

.more-links {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 20px 40px;
    background-color: #007aff;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    animation: glow 2s infinite;
}

.more-links:hover {
    background-color: #005bb5;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 10px #007aff;
    }
    50% {
        box-shadow: 0 0 20px #3399ff;
    }
    100% {
        box-shadow: 0 0 10px #007aff;
    }
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    background-color: var(--window-background-color);
    border: 1px solid #ccc;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.popup-content {
    padding: 20px;
}

.popup-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--title-bar-background-color);
    padding: 10px;
    border-bottom: 1px solid #ccc;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.popup-title {
    font-weight: bold;
    color: var(--text-color);
}

.popup-close {
    cursor: pointer;
    font-size: 20px;
    color: var(--text-color);
}

.popup-message {
    margin: 20px 0;
    color: var(--text-color);
}

.popup-buttons {
    display: flex;
    justify-content: space-between;
}

.popup-button {
    padding: 10px 20px;
    background-color: #007aff;
    border: none;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

.popup-button:hover {
    background-color: #005bb5;
}
