:root {
    --background-color: #f4f4f4;
    --text-color: #000;
}

[data-theme="dark"] {
    --background-color: #121212;
    --text-color: #fff;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    -ms-overflow-style: none;  /* For Internet Explorer and Edge */
    display: none;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

html {
    scrollbar-width: none; /* For Firefox */
}

/* For Chrome, Safari, and Opera */
body::-webkit-scrollbar {
    display: none;
}

html.transition, body.transition {
    transition: background-color 0.5s, color 0.5s;
}

/* Add this CSS rule */
.transition {
    transition: background-color 0.5s, color 0.5s;
}

.header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    align-items: center;
    height: 200px; /* Adjusted from previous examples */
    padding: 20px;
    background: url('https://cdn.arrival.studio/mw/Fredbear.png') center center / cover no-repeat;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
    background-blend-mode: overlay;
    color: #fff; /* Ensures text is white */
    position: relative; /* Ensure positioning context for theme switch */
}

.header img {
    width: 20%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.header-description {
    color: #ffff;
    font-size: 16px; /* Appropriate text size */
    margin-top: 2.5px; /* Space between the title and description. Originally 5 */
    text-align: center; /* Center alignment for the text */
    max-width: 80%; /* Limits the width of the description text for better readability */
    margin-left: auto; /* Together with margin-right: auto, centers the text block */
    margin-right: auto;
}

.main-website-link {
    font-family: 'Dosis', sans-serif;
    font-weight: 600; /* Bold on hover */
    position: absolute;
    top: 20px; /* Adjust as needed */
    left: 20px; /* Adjust as needed */
    text-decoration: none;
    color: #FFF; /* Change color as needed */
    font-size: 16px; /* Adjust as needed */
    background: transparent;
    border: none;
    cursor: pointer;
}

.main-website-link:hover {
    color: #005f73; /* Change color as needed */
}

.search-box {
    position: relative;
    display: flex;
    align-items: center; /* This keeps the icon vertically centered */
    background-color: #fff; /* Set the background color similar to your input field */
    border-radius: 20px; /* Match this to your input's border-radius */
    padding: 0 10px; /* Padding around the entire box */
    width: fit-content; /* This will make the div wrap tightly around the content */
    height: 35px;
}

.search-icon {
    color: gray;
    position: absolute;
    left: 15px; /* Adjust this value so the icon fits nicely inside the box */
    z-index: 10;
}

#searchInput {
    flex-grow: 1;
    border: none; /* Remove any default border */
    outline: none; /* Remove focus outline */
    padding-left: 40px; /* Space to prevent text from overlaying the icon */
    background-color: transparent; /* Ensure the input has no background */
    border-radius: 20px; /* Ensure rounded corners if desired */
}

.search-box input[type="text"] {
    flex-grow: 1; /* Allows the input to expand to fill available space */
    border: 2px solid #E7E7E7;
    padding: 8px;
    border-radius: 10px;
    outline: none;
}

.sort-filters {
    text-align: center;
    color: gray;
    font-size: 1em;
    margin-bottom: 10px; /* Space before the buttons */
    display: flex;
    justify-content: left;
    align-items: left;
}

.sort-filters i {
    margin-right: 5px; /* Space between the icon and the text */
}

.category-buttons button {
    margin-right: 10px;
    border: 0px solid #ccc;
    padding: 8px 16px;
    background-color: #F3F3F3;
    cursor: pointer;
    border-radius: 5px; /* Rounded corners */
    transition: color 0.2s ease, background-color 0.2s ease;
}

.category-buttons button:hover {
  transform: scale(1.05); /* Slightly grow */
  background-color: #CDCDCD; /* Blue background on hover */
}

.category-buttons button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    transform: scale(1.1); /* Slightly grow */
}

.container {
    width: 80%;
    margin: 20px auto;
    background: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 5px;
}

[data-theme="dark"] .container {
    background: #333;
}

.release-image {
    width: 100%; /* Full width of the container */
    max-width: 300px; /* Limits the size to maintain appearance */
    height: auto; /* Maintain aspect ratio */
    border-radius: 8px; /* Optional: rounded corners for aesthetics */
    margin-right: 20px; /* Adds some space between the image and the text */
    display: block; /* Ensures it behaves like a block element */
    float: left; /* Aligns the image to the left of the text */
    transition: filter 0.2s ease, transform 0.2s ease; /* Smooth transition for filter and transform changes */
}

.release-image:hover {
    filter: brightness(60%);
    transform: scale(1.02); /* Slightly enlarges the image on hover */
}

.category-label {
    display: inline-block; /* Makes the label inline */
    background-color: #E6E6E6; /* Green background to match your example, adjust as needed */
    color: black;  /* Text color */
    text-align: center;
    padding: 4px 8px; /* Adjust padding to make it smaller */
    border-radius: 5px; /* Rounded corners */
    font-size: 0.85em; /* Slightly smaller text */
    font-weight: bold;
    margin-bottom: 4px; /* Reduced bottom margin to bring it closer to the title */
    margin-top: 0;
}

[data-theme="dark"] .category-label {
    background-color: #838383; /* Darker gray background in dark mode */
    color: white;
}

.release {
    clear: both; /* Clears the float, adjusting layout for subsequent content */
    padding: 20px; /* Adds padding around each release for spacing */
    border-bottom: 1px solid #ccc; /* Optional: adds a line separator between releases */
    margin-bottom: 20px; /* Space between releases */
    overflow: hidden; /* Ensures the container does not collapse around the floated image */
}

.release-description {
    font-size: 14px; /* Adjust font size as needed */
    color: #929292; /* A softer color for readability */
    margin-top: 5px; /* Space between the title and description */
}

[data-theme="dark"] .release-descirption {
    color: #409D40;
}

.release-date {
    color: gray; /* Sets the text and icon color to gray */
    font-size: 16px; /* Match the font size to your layout needs */
    margin-top: 5px; /* Provides space between the description and the date */
}

.release-date i {
    margin-right: 5px; /* Adds space between the icon and the text */
}

.new-update {
    background-color: #E6E6E6;  /* Yellow background */
    color: black;  /* Text color */
    border-radius: 5px;  /* Rounded corners */
    padding: 5px 10px;  /* Top and bottom, Left and right padding */
    font-weight: bold;  /* Bold text */
    margin-left: 8px;  /* Space between the label and the preceding text */
    font-size: 0.6em;  /* Smaller font size relative to surrounding text */
    position: relative;  /* Enables relative positioning */
    top: -3px;  /* Moves the element up by 2 pixels */
}

[data-theme="dark"] .new-update {
    background-color: #838383;  /* Darker gray background in dark mode */
    color: lightgoldenrodyellow;
}

@media (max-width: 1100px) {
    .release-image {
        width: 100%; /* Full width on small screens */
        max-width: none; /* Removes max-width */
        float: none; /* Stops floating */
        display: block; /* Keeps block display */
        margin: 0 auto 20px; /* Centers the image and adds space below before text */
    }
}

.release h2 {
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    transition: transform 0.5s ease; /* Smooth transition for scaling */
    margin-top: 10px;
}

a {
    color: green;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

a:hover {
    text-decoration: none;
    color: #006900;
}

.changeTitle {
    margin-left: 20px;
    font-size: 32px;
}

.change {
    margin-left: 20px;
    font-size: 18px;
}

.notice-container {
    background-color: #8E7800; /* Yellow background */
    color: white; /* White text */
    display: flex; /* Flexbox to align icon and text */
    width: 80%;
    margin: 20px auto;
    padding: 15px 20px; /* Padding for some breathing room */
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    align-items: center; /* Center items vertically */
    border-radius: 5px;
    position: relative; /* Ensure position relative for absolute positioning of close button */
}

.notice-container i {
    font-size: 24px; /* Larger icon */
    margin-right: 10px; /* Space between icon and text */
    color: white; /* White icon */
}

.notice-container a {
    color: #007399;
    text-decoration: none; /* Optional: removes underline from links */
    transition: color 0.2s ease, background-color 0.2s ease;
}

.notice-container a:hover {
    color: #006789;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6); /* White with 60% opacity */
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    transition: color 0.2s ease; /* Smooth color transition */
}

.close-btn:hover {
    color: rgba(255, 255, 255, 0.9); /* Darker white with 90% opacity */
}

.notice-container.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.downloads {
    margin-bottom: 25px; /* Space above the 'Back to All Versions' link */
    margin-top: 25px; /* Space above the 'Back to All Versions' link */
}

.download-link {
    display: block; /* Makes each link take the full width and stack */
    color: #005f73; /* Color matching 'Back to All Versions' */
    text-decoration: none; /* Removes underline */
    font-size: 20px; /* Matches the font size of 'Back to All Versions' */
    margin-bottom: 10px; /* Space between each download link */
    position: relative; /* Needed for absolute positioning of the icon */
    padding-left: 25px; /* Space for the icon */
    transition: color 0.2s ease, background-color 0.2s ease;
}

.download-link:hover {
    text-decoration: none;
    color: #003F4D;
}

.download-link i {
    position: absolute; /* Absolute positioning relative to the link */
    left: 0; /* Position icon to the far left of the text */
    top: 50%; /* Center vertically */
    transform: translateY(-50%); /* Fine-tune vertical alignment */
    color: #32CD32; /* Simple green color for the icon */
}

[data-theme="dark"] .download-link {
    color: #00A3C6;
}

[data-theme="dark"] .download-link:hover {
    color: #017690;
}

[data-theme="dark"] .download-link i {
    color: #409D40;
}

.theme-switch-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}

input:checked + .slider {
    background-color: #66bb6a;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.slider .sun-icon {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    color: #ffeb3b;
    font-size: 18px;
    transition: opacity 0.4s;
    opacity: 1; /* Show sun icon by default */
}

/* Moon icon styling */
.slider .moon-icon {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    color: #9b59b6; /* Lighter purple color */
    font-size: 18px;
    transition: opacity 0.4s;
    opacity: 0; /* Hide moon icon by default */
}

input:checked + .slider .moon-icon {
    opacity: 1; /* Show moon icon when checked */
}

input:checked + .slider .sun-icon {
    opacity: 0; /* Hide sun icon when checked */
}

@media (max-width: 767px) {
    .header h1 {
        font-size: 1.5em;  /* Even smaller font size for mobile */
    }

@media (max-width: 1100px) {
    .header img {
        width: 50%;
        height: auto;
    }
}
