@import url('https://fonts.googleapis.com/css2?family=Teachers&display=swap');

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Teachers', Arial, sans-serif;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    position: relative;
}

p {
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    line-height: 1; /* Adjust line height as needed */
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/background.png');
    background-repeat: repeat;
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: blur(3px);
    transform: scale(1.02);
}

header, main, footer {
    position: relative;
    z-index: 1;
}

.alert-banner {
    background-color: red;
    color: white;
    text-align: center;
    padding: 10px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

body {
    margin-top: 0px;
}

header {
    background-color: #222222;
    color: white;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0px;
    z-index: 1000;
}

body.announcement-active {
    margin-top: 39px;
}

body.announcement-active header {
    top: 39px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    max-width: 1700px;
}

.website-name {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    font-size: 35px;
}

.website-name a {
    color: white;
    text-decoration: none;
}

nav {
    flex: 2;
    display: flex;
    justify-content: center;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

.search-bar {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.search-bar input {
    font-family: 'Teachers', Arial, sans-serif;
    padding: 0.5rem;
    border: none;
    border-radius: 5px 0 0 5px;
}

.search-bar button {
    font-family: 'Teachers', Arial, sans-serif;
    padding: 0.5rem;
    border: none;
    background-color: #555;
    color: white;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
}

.search-results {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;         /* Rounded corners */
    padding: 5px 10px;          /* Reduced padding to minimize extra space */
    position: absolute;
    top: 60px;                  /* Position below the search bar */
    width: 180px;
    max-height: 200px;          /* Limits height if there are many results */
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.search-results {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;            /* Rounded corners */
    padding: 5px 10px;             /* Reduced padding to tighten space */
    position: absolute;
    top: 60px;                     /* Position below the search bar */
    width: 180px;
    max-height: 200px;             /* Limits height if there are many results */
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.search-results a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 6px 0;               /* Reduced padding to minimize spacing */
    margin: 0;                     /* Ensure no extra margin */
}

.search-results a:hover {
    background-color: #eaeaea;
    border-radius: 4px;            /* Rounded corners for hover effect */
}

.no-results-message {
    color: black;              /* Set text color to black */
    text-align: center;        /* Center the text */
    margin: 20px 0;           /* Add some margin for spacing */
}

main {
    flex: 1;
    padding: 6rem 2rem 4rem 2rem;
    text-align: center;
}

.game-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    max-width: 1200px; /* Adjust the max-width as needed */
    margin: 0 auto; /* Center the game grid */
}

.game-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 10px;
}

.game-button img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.game-button button {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background-color: #333;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.game-button button:hover {
    background-color: #555;
}

footer {
    background-color: #222222;
    color: white;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    z-index: 1000;
    margin-top: auto; /* Add this line to push the footer to the bottom */
}

.footer-whole {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    max-width: 1700px;
}

.footer-left  {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.footer-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.footer-right a {
    color: white;
    text-decoration: none;
}

.footer-left a {
    color: white;
    text-decoration: none;
}

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 70vh;
}

.error-page img {
    width: 50%;
    max-width: 200px;
    height: auto;
    margin-bottom: 2rem;
}

.error-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.error-page p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

.error-links {
    display: flex;
    gap: 1rem;
}

.error-link {
    padding: 0.75rem 1.5rem;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.error-link:hover {
    background-color: #555;
}

.game-iframe {
    border-radius: 15px;
    overflow: hidden;
}

.game-iframe-container {
    border-radius: 15px;
    overflow: hidden;
}

.game {
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.swf-game-frame {
    width: 775px;
    height: 460px;
    border: 1px solid #000;
    margin: 0 auto;
}

.resize-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    color: white;
    font-size: 24px;
    text-align: center;
    padding-top: 20%;
    z-index: 9999;
}

.resize-overlay .smaller-text {
    font-size: 0.8em; /* Adjust the font size as needed */
    margin-top: 10px; /* Optional: add some space above the text */
}


@media screen and (max-width: 1227px) {
    .resize-overlay {
        display: block;
    }
}

.update-log {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.update-log .update-entry {
    background-color: rgba(255, 255, 255, 0.5); /* Semi-transparent white background */
    padding: 10px 20px; /* Adjusted padding for smaller box when collapsed */
    margin-bottom: 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease; /* Smooth transition */
}

.update-log .update-content {
    display: none; /* Collapsed by default */
    padding-top: 10px;
}

.update-log .update-entry.active .update-content {
    display: block; /* Expanded when active */
    padding-top: 10px; /* Padding for content when expanded */
}

.update-log .update-entry.active {
    padding-bottom: 20px; /* Additional padding for expanded state */
}

.update-log h1 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
}

.update-log h2 {
    font-size: 1.5em;
    margin-bottom: 0;
    line-height: 1.2; /* Adjusted line height */
}

.update-log ul {
    list-style-type: disc;
    padding-left: 20px;
}

.update-log .arrow {
    font-size: 1.2em; /* Slightly smaller arrow */
    transition: transform 0.3s ease;
    user-select: none; /* Prevent arrow from being highlighted */
}

.update-log .update-entry.active .arrow {
    transform: rotate(90deg); /* Rotate arrow when active */
}

.fullscreen-button {
    position: relative;
    margin-top: 10px; /* Space between the game frame and button */
    padding: 0.5rem 1rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;     
    transition: background-color 0.3s;
}

.fullscreen-button:hover {
    background-color: #555;
}

#fullscreen-btn {
    margin: 10px auto;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    display: block; 
}

.game-alert-button {
    position: relative;
    margin-top: 10px; /* Space between the game frame and button */
    padding: 0.5rem 1rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 0px;
}