/* General body styles */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    font-size: 18px; /* Base font size */
    visibility: hidden; /* Prevent FOUC */
    font-family: 'Courier New', monospace; /* Set the universal font */
    
}
footer {
    text-align: center; /* Center-align the content inside the footer */
}
/* Back to Top Button Styles */
footer .back-to-top {
    margin: 10px auto; /* Add vertical margin and center horizontally */
    padding: 10px 20px;
    background-color: #b1b1b1; /* Button background color */
    color: #353434; /* Button text color */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: inline-block; /* Ensure the button respects the text alignment */
}

footer .back-to-top:hover {
    background-color:  #4d4b4b /* Darker blue on hover */
}
body.loaded {
    visibility: visible; /* Make the body visible after the page is fully loaded */
}

/* Resized image styles */
.resized-image {
    width: 300px; /* Set the desired width */
    height: auto; /* Maintain the aspect ratio */
    max-width: 100%; /* Ensure the image does not exceed the container's width */
}

/* Light mode styles */
body.light-mode {
    background-color: #ffffff;
    color: #000000;
}

body.light-mode .search-bar {
    background-color: #ffffff;
    color: #000000;
}

body.light-mode #title h2 {
    color: #333333;
    background-color: #ffffff;
}

/* Dark mode styles */
body.dark-mode #pogDetailsModal {
    background-color: rgba(0, 0, 0, 0.8); /* Darker background overlay */
}

body.dark-mode #pogDetailsModal .modal-content {
    background-color: #1e1e1e; /* Dark background for the modal */
    color: #ffffff; /* Light text color for readability */
    border: 1px solid #444; /* Subtle border for the modal */
    
}

body.dark-mode #pogDetailsModal .modal-text h2 {
    color: #ffffff; /* Ensure the title is visible in dark mode */
}

body.dark-mode #pogDetailsModal .modal-text p {
    color: #cccccc; /* Slightly lighter text for better readability */
}


body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

body.dark-mode .search-bar {
    background-color: #333333;
    color: #ffffff;
}

body.dark-mode  .h2 {
    color: #5f5c5c;
    background-color: #333333;
   
}

/* Title styles */
h2 {
    font-size: 2.5em; /* Title font size */
    color: #333; /* Title color */
    text-align: center; /* Center the title */
    margin-bottom: 20px; /* Space below the title */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); /* Subtle text shadow */
    border: 2px solid #d3d3d3; /* Border around the title */
    background-color: #b9b7b7; /* Title background color */
    padding: 10px; /* Padding inside the border */
    border-radius: 10px; /* Rounded corners */
}

/* Tab styles */
.tab {
    display: none;
}

.tab.active {
    display: block;
}

/* Search bar styles */
.search-bar {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.search-bar input,
.search-bar button,
.search-bar select {
    font-size: 1.2em; /* Font size for inputs and buttons */
}
#pogDetailsContent {
    display: flex;
    flex-direction: row; /* Default: Arrange content in a row */
    align-items: flex-start; /* Align items at the top */
    gap: 20px; /* Add space between the image and text */
    width: 90%; /* Use 90% of the screen width for responsiveness */
    max-width: 600px; /* Set a maximum width */
    height: auto; /* Allow height to adjust based on content */
    max-height: 80vh; /* Use 80% of the viewport height */
    overflow-y: auto; /* Add scrollbars if content overflows vertically */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    padding: 20px; /* Add padding for better spacing */
    box-sizing: border-box; /* Include padding in width/height */
    background-color: #fff; /* Ensure a clear background */
    border-radius: 10px; /* Add rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a subtle shadow for better visibility */
    font-size: medium;
}

/* Ensure the image is on the side by default */
#pogDetailsContent .modal-image {
    flex: 0 0 auto; /* Allow the image to resize naturally */
    max-width: 200px; /* Set a maximum width for the image */
    height: auto; /* Maintain the aspect ratio */
    margin-right: 20px; /* Add spacing between the image and text */
    align-self: flex-end; /* Align the image to the bottom of the text */
}

/* Ensure the text takes up the remaining space */
#pogDetailsContent .modal-text {
    flex: 1; /* Allow the text to take up the remaining space */
    overflow-y: auto; /* Add scrollbars if the text overflows */
    word-wrap: break-word; /* Ensure long words break properly */
    line-height: 1.5; /* Improve readability of the text */
}

/* Adjust layout when the content's height is greater than its width */
@media (max-aspect-ratio: 1/1) {
    #pogDetailsContent {
        flex-direction: column; /* Stack content vertically */
        align-items: center; /* Center align items */
        font-size: x-large;
       
    }
    body {
        font-size: 30px; /* Increase base font size for mobile */
    }

    #pogDetailsContent .modal-image {
        flex: 0 0 auto; /* Allow the image to resize naturally */
        max-width: 250px; /* Increased maximum width for the image */
        width: 100%; /* Ensure the image takes up the full width of its container */
        height: auto; /* Maintain the aspect ratio */
        margin-right: 20px; /* Add spacing between the image and text */
        align-self: center; /* Center the image horizontally */

    }
    footer .back-to-top {
        padding: 20px 40px; /* Increase padding for a larger button */
        font-size: 22px; /* Increase font size for the button text */
    }
    
}

/* Add media query for smaller screens */
/* Add media query for smaller screens */
/* Add media query for smaller screens */
@media (max-width: 600px) {
    #pogDetailsContent {
        flex-direction: column; /* Stack content vertically */
        align-items: center; /* Center align items */
        width: 95%; /* Use more of the screen width on smaller devices */
        max-width: none; /* Remove the maximum width constraint */
        max-height: 90vh; /* Use 90% of the viewport height */
        padding: 15px; /* Reduce padding for smaller screens */
        font-size: xx-large;
    }
    #pogDetailsContent .modal-image {
        width: 100%; /* Make the image take up the full width of the container */
        max-width: 400px; /* Increased maximum width for smaller screens */
        height: auto; /* Maintain the aspect ratio */
        margin-right: 0; /* Remove right margin for vertical layout */
        margin-left: 20px; /* Move the image more to the right */
        margin-bottom: 15px; /* Add spacing below the image */
        align-self: center; /* Center the image horizontally */
        display: block; /* Ensure the image is treated as a block element */
    }

    #pogDetailsContent .modal-text {
        text-align: center; /* Center-align the text for better readability */
    }
}
/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align modal higher on the screen */
    padding-top: 50px; /* Add some spacing from the top */
}

.modal-content {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1.2em; /* Modal content font size */
}

/* Close button styles */
.close {
    color: #aaa;
    align-self: flex-end;
    font-size: 2em; /* Close button font size */
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* Table styles */
table {
    font-size: 1.2em; /* Table font size */
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background-color: #f0f0f0;
    color: #333;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #ccc;
}

tbody td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

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

tbody tr:hover {
    background-color: #f1f1f1;
    cursor: pointer;
}

/* Color guide styles */

.color-guide {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 100%; /* Allow full width */
    margin-left: auto;
    margin-right: auto;
}

.color-guide h3 {
    margin-bottom: 15px;
    font-size: 20px;
    text-align: center;
    font-weight: bold;
    color: #333;
}

.color-guide .color-row {
    display: flex; /* Use flexbox for horizontal alignment */
    justify-content: center; /* Center items horizontally */
    gap: 20px; /* Add space between items */
    flex-wrap: wrap; /* Wrap items to the next line if needed */
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.color-guide.dark-mode h3 {
    color: #bbbbbb; /* Lighter text color for better readability in dark mode */
}
.color-box {
    width: 40px; /* Box size */
    height: 40px;
    margin-bottom: 8px;
    border: 1px solid #000;
    border-radius: 4px; /* Rounded corners */
}

.color-item span {
    font-size: 14px;
    color: #949494;
}


/* Switch styles */
.switch {
    position: absolute;
    top: 20px;
    right: 20px;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

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

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #262a2e;
}

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

/* Dark mode-specific styles */
.modal-content.dark-mode {
    background-color: #333333;
    color: #ffffff;
}

.color-guide.dark-mode {
    background-color: rgba(50, 50, 50, 0.8);
    border-color: #555555;
}

.color-guide.dark-mode .color-box {
    border: 1px solid #ffffff;
}

/* Light mode colors */
.color-guide.light-mode .color-box.trash { background-color: #fcdcdc; }
.color-guide.light-mode .color-box.common { background-color: #ffedc1; }
.color-guide.light-mode .color-box.uncommon { background-color: #EBF8DC; }
.color-guide.light-mode .color-box.rare { background-color: #DCF2F8; }
.color-guide.light-mode .color-box.mythic { background-color: #E7D5F3; }
.color-guide.light-mode .color-box.unknown { background-color: #FFFFFF; }

/* Dark mode colors */
.color-guide.dark-mode .color-box.trash { background-color: #412020; }
.color-guide.dark-mode .color-box.common { background-color: #4b3317; }
.color-guide.dark-mode .color-box.uncommon { background-color: #3d442f; }
.color-guide.dark-mode .color-box.rare { background-color: #2d3f4d; }
.color-guide.dark-mode .color-box.mythic { background-color: #34314b; }
.color-guide.dark-mode .color-box.unknown { background-color:  #333333; }