/* General styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f3;
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    background-color: #2ab7a9; /* Turquoise accent color */
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    margin-right: auto; /* Pushes everything else to the right */
    text-decoration: none;
    color: #fff;
}

.header-logo img {
    height: 40px;
    margin-right: 10px;
}

header h1 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
    text-align: center;
    flex: 1; /* Centers the title in the remaining space */
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem;
}

nav a:hover {
    text-decoration: underline;
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1rem;
}

/* Mineplex logo in top left */
#mineplex-logo {
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 1.25rem;
    font-weight: bold;
    color: #fff;
}

/* Intro section */
.intro {
    text-align: center;
    margin-bottom: 2rem;
}

.game-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.game-link {
    background-color: #2ab7a9;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s;
}

.game-link:hover {
    background-color: #279893;
}

/* Game menu styles */
#game-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.game-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    min-height: 150px;
}

.game-card:hover {
    transform: translateY(-5px);
}

.game-card img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.game-card h2 {
    font-size: 1.1rem;
    color: #2ab7a9;
    margin: 0.5rem 0;
}

.game-card a {
    display: inline-block;
    margin-top: 0.5rem;
    color: #2ab7a9;
    text-decoration: none;
    font-weight: bold;
}

.game-card a:hover {
    text-decoration: underline;
}

/* Leaderboard styles */
#leaderboard-container {
    margin-top: 2rem;
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 2rem auto;
}

#leaderboard {
    width: 100%;
    border-collapse: collapse;
}

#leaderboard th,
#leaderboard td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#leaderboard th {
    background-color: #2ab7a9;
    color: #fff;
    font-weight: bold;
}

#leaderboard tr:nth-child(even) {
    background-color: #f9f9f9;
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1rem;
    align-items: center;
}

/* Container for the grid of game tiles */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
    background-color: #f5f5f5;
}

/* Each individual game tile */
.game-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    background: #ffffff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.game-tile img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
    object-fit: cover;
}

.game-tile:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.game-name {
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    color: #333;
}

/* Pagination controls */
.pagination {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

.pagination a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 1.1em;
    background-color: #f5f5f5;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background-color: #009688; /* New accent color */
    color: #fff;
}

.pagination .prev {
    text-align: left;
}

.pagination .next {
    text-align: right;
}

.game-title {
    font-size: 2rem; /* Larger font size for visibility */
    font-weight: bold;
    color: #2ab7a9; /* Turquoise accent color */
    text-align: center;
    margin: 0;
    padding: 0.5rem 0;
    letter-spacing: 1px; /* Adds spacing between letters for a modern feel */
    text-transform: uppercase; /* Capitalizes the game title */
    background-color: rgba(0, 0, 0, 0.1); /* Light background for contrast */
    border-radius: 5px;
}
