:root {
    --bg-color: #111;
    --text-color: #fff;
    --accent-color: #7700e7;
}

[data-theme="lightblue"] {
    --bg-color: #111;
    --text-color: #fff;
    --accent-color: #00aaff;
}

[data-theme="green"] {
    --bg-color: #111;
    --text-color: #fff;
    --accent-color: #00ff4c;
}

[data-theme="orange"] {
    --bg-color: #111;
    --text-color: #fff;
    --accent-color: #ff7300;
}

[data-theme="blue"] {
    --bg-color: #111;
    --text-color: #fff;
    --accent-color: #0800ff;
}

[data-theme="red"] {
    --bg-color: #111;
    --text-color: #fff;
    --accent-color: #cb2121;
}

[data-theme="pink"] {
    --bg-color: #111;
    --text-color: #fff;
    --accent-color: #FF88D0;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-color), 10%, transparent 10%);
    background-size: 20px 20px;
    opacity: 0.1;
    animation: footerBg 10s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes footerBg {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-20px, -20px);
    }
}

main::-webkit-scrollbar {
    width: 0;
    height: 0; 
}

/* Header */
header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0px;
    background: transparent;
    position: relative;
    top: 0;
}

header .logo .icon svg {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin-top: -15px;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 35px;
    height: 5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: -10px;
    margin-right: -15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(90, 90, 90, 0.1);
}

nav ul li a i.material-icons {
    font-size: 18px;
    color: var(--accent-color);
    align-items: center;
}

nav ul li a img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto; /* Enable scrolling for the main content */
    max-height: calc(100vh - 40px); /* Adjust based on your header/footer height */
}

main h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 40px;
}

.profile-container {
    width: 90%;
    max-width: 800px;
    max-height: 400px; /* Adjust this value as necessary */
    background-color: #1e1e1e;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: -90px;
    border: var(--accent-color) solid;
}

.profile-left {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-picture {
    width: 150px;
    height: 150px;
    position: relative;
    margin-bottom: 20px;
}

.profile-picture img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-overlay input[type="file"] {
    display: none;
}

.upload-overlay label {
    color: white;
    cursor: pointer;
    font-size: 24px;
}

.profile-picture:hover .upload-overlay {
    opacity: 1;
}

#file-upload {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.favorites a {
    color: #fff; 
    text-decoration: none; 
}

.favorites a:visited {
    color: #fff; 
    text-decoration: none; 
}

.favorites a:hover,
.favorites a:focus {
    color: var(--accent-color);
    text-decoration: none; 
}

.username {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username #username {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.edit-icon {
    cursor: pointer;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.profile-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.theme-selector {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.theme-selector label {
    color: var(--text-color);
}

.theme-selector select {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    padding: 5px;
    border-radius: 5px;
    cursor: pointer;
}
.stats {
    max-height: 100px;
}

.stats, .favorites {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
}

.stats h2, .favorites h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.stats h2 i, .favorites h2 i {
    font-size: 1.4rem;
    margin-right: 8px;
    color: var(--accent-color);
}

.stats ul, .favorites ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 70px; /* Height for 4 items (assuming 40px per item) */
    overflow-y: auto;
}

.stats li, .favorites li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats li:last-child, .favorites li:last-child {
    border-bottom: none;
}

.game-stats-list {
    margin-top: 10px;
}

.stats ul::-webkit-scrollbar, 
.favorites ul::-webkit-scrollbar,
main::-webkit-scrollbar {
    width: 4px;
}

.stats ul::-webkit-scrollbar-thumb,
.favorites ul::-webkit-scrollbar-thumb,
main::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.stats ul::-webkit-scrollbar-thumb:hover,
.favorites ul::-webkit-scrollbar-thumb:hover,
main::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr; 
        margin-top: 0;
        padding: 15px;
    }

    .profile-picture {
        width: 120px;
        height: 120px;
    }

    .profile-container h1 {
        font-size: 2.5rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .username #username {
        font-size: 1.2rem; 
    }

    .stats h2, .favorites h2 {
        font-size: 1rem;
    }

    .stats li, .favorites li {
        padding: 8px 0; 
    }
}
