/* General Reset and Base Styles from Epic Games Store */
html {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    background-color: rgb(16, 16, 20); /* Dark background */
}

*, ::before, ::after {
    box-sizing: inherit;
}

body {
    font-family: 'Inter', sans-serif; /* Epic's preferred font */
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    color: rgb(255, 255, 255); /* White text for dark background */
}

a {
    text-decoration: none;
    color: rgb(38, 187, 255); /* Epic's blue for links */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

a:hover {
    text-decoration: underline;
}

button {
    outline: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    appearance: none;
    background: rgba(0, 0, 0, 0);
    border-width: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
    text-align: left;
    font-weight: 400;
    color: inherit; /* Inherit text color */
}

input, label, select, button, textarea {
    margin: 0;
    border: 0;
    padding: 0;
    display: inline-block;
    vertical-align: middle;
    white-space: normal;
    background: none;
}

input {
    outline: 0;
}

input:not(:focus) {
    border-color: rgba(0, 0, 0, 0);
}

input::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Custom Styles */
.navbar {
    background-color: rgb(24, 24, 28); /* Slightly darker than body */
    color: white;
    padding: 1em 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.5rem; /* Standard height from Epic's navigation */
}

.branding-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between icon and text */
}

.branding-icon {
    height: 32px; /* Adjust size as needed */
    width: 32px;
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%); /* This filter should turn any color to white */
}

.branding-text {
    font-size: 1.2em;
    font-weight: 600;
    color: white;
}

.navbar .home-icon {
    color: white;
    text-decoration: none;
    font-size: 24px;
    display: flex;
    align-items: center;
    padding: 0.5em; /* Add some padding for click area */
    border-radius: 4px;
}

.navbar .home-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar .home-icon svg {
    fill: white;
    width: 24px;
    height: 24px;
}

.navbar .search-bar {
    flex-grow: 1;
    margin: 0 20px;
    max-width: 500px;
    background-color: rgb(32, 32, 36); /* Darker background for search bar */
    border-radius: 24px; /* Rounded corners */
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.navbar .search-bar input {
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    color: white;
    font-size: 1rem;
}

.navbar .search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.navbar .sign-in-btn {
    background-color: rgb(38, 187, 255); /* Epic's blue */
    color: rgb(0, 0, 0); /* Black text for blue button */
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.125s ease-in-out;
}

.navbar .sign-in-btn:hover {
    background-color: rgb(97, 205, 255); /* Lighter blue on hover */
}

/* Main Navigation Styles */
.main-nav {
    display: flex;
    align-items: center;
    margin-left: 20px; /* Space between search bar and nav links */
}

.main-nav a {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5em 1em;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.125s ease-in-out, background-color 0.125s ease-in-out;
    border-radius: 4px;
}

.main-nav a:hover {
    color: rgb(255, 255, 255);
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* User Profile in Navbar */
.auth-container {
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.profile-bubble {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgb(95, 227, 103); /* Epic green */
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
    color: black; /* Text color for the bubble */
}

.display-name {
    font-weight: 500;
}

.logout-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.125s ease-in-out;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}


.container {
    display: flex;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
    gap: 20px; /* Use gap for spacing */
}

.main-content {
    flex: 3;
    background-color: rgb(24, 24, 28); /* Darker background for content */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow */
}

.sidebar {
    flex: 1;
    background-color: rgb(24, 24, 28); /* Darker background for content */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow */
}

h2, h3 {
    color: rgb(255, 255, 255); /* White headings */
}

.news-item {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Lighter separator */
    padding-bottom: 15px;
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-item h3 {
    color: rgb(38, 187, 255); /* Epic's blue for news titles */
}

.news-item p {
    color: rgba(255, 255, 255, 0.8); /* Slightly faded text */
}

.news-item small {
    color: rgba(255, 255, 255, 0.5); /* Even more faded for meta info */
}

.sidebar h3 {
    color: rgb(95, 227, 103); /* Epic's green for sidebar titles */
    margin-top: 0;
}

.game-list ul {
    list-style: none;
    padding: 0;
}

.game-list li {
    margin-bottom: 10px;
}

.game-list li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8); /* Faded white for list items */
    transition: color 0.125s ease-in-out;
}

.game-list li a:hover {
    color: rgb(38, 187, 255); /* Epic's blue on hover */
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease-in-out;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: rgb(24, 24, 28);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease-in-out;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: color 0.125s ease-in-out;
}

.modal-close-btn:hover {
    color: rgb(255, 255, 255);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: rgb(255, 255, 255);
}

.epic-sign-in-btn {
    background-color: rgb(0, 120, 212); /* A distinct blue for Epic */
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.125s ease-in-out;
}

.epic-sign-in-btn:hover {
    background-color: rgb(0, 100, 180);
}

.epic-sign-in-btn svg {
    fill: white;
    width: 20px;
    height: 20px;
}