/* General Styles */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    color: #FFFFFF;
    background-color: #121212;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #1E1E1E;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

header .logo {
    font-size: 1.5em;
    font-weight: bold;
}

.logo img {
    width: 110px; /* Adjust width as needed */
    height: auto;

}

.logo-image {
    max-width: 100%;
    height: auto;
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allows nav items to wrap */
    padding: 0;
    margin: 0;
}

nav ul li a {
    color: #BBBBBB;
    text-decoration: none;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

nav ul li a.active,
nav ul li a:hover {
    color: #FFFFFF;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* Update the .search-container class to align search bar and buttons in one row */
.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20vh; /* Adjust this to vertically align the container */
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.search-container input {
    width: 400px; /* Make the search bar wider */
    padding: 10px;
    font-size: 1.1em;
    border: 2px solid #444;
    border-radius: 5px 0 0 5px; /* Rounded corners on the left */
    background-color: #222;
    color: #FFF;
    outline: none;
    transition: border-color 0.3s ease;
    height: 42px; /* Ensure consistent height with buttons */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

.search-container input:focus {
    border-color: #1E90FF;
}

.search-container button {
    padding: 10px 20px;
    font-size: 1.1em;
    border: none;
    background-color: #1E90FF;
    color: #FFF;
    cursor: pointer;
    height: 42px; /* Ensure consistent height with input */
    margin-left: 0; /* Reset margin to prevent overlapping */
    border-radius: 0 5px 5px 0; /* Rounded corners on the right */
    transition: background-color 0.3s ease;
}

.search-container button + button {
    margin-left: 10px; /* Add space between buttons */
}

.search-container button:hover {
    background-color: #3AA0FF;
}

.grid-container {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

/* Grid Item Styling */
.grid-item {
    background-color: #1E1E1E;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
}

.grid-item .title-placeholder {
    width: 100%;
    padding: auto;
    background-color: #333;
    color: #FFF;
    text-align: center;
    font-size: 1.2em;
    line-height: 1.4em;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.grid-item .info {
    padding: 10px;
    text-align: center;
}

.grid-item .info h3 {
    margin: 1px 0;
    font-size: 1em;
    color: #FFF;
}

.grid-item .info p {
    margin: 0px 0;
    font-size: 0.9em;
    color: #BBB;
}

.grid-item .download-link {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #1E90FF;
    color: #FFF;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.grid-item .download-link:hover {
    background-color: #3AA0FF;
}

.header-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allows wrapping for smaller screens */
}

.btc-wallet {
    color: #FFFFFF;
    font-size: 0.9em;
    margin-left: 20px; /* Adjust as needed for spacing */
    display: flex;
    align-items: center;
}

.btc-wallet p {
    margin: 0;
    padding-right: 10px; /* Space between text and QR code */
}

#btc-address {
    font-weight: bold;
}

.btc-qr {
    width: 50px; /* Initial size */
    height: auto;
    margin-left: 10px; /* Space between QR code and address text */
    transition: transform 0.3s ease; /* Animation effect */
}

.btc-qr:hover {
    transform: scale(1.5); /* Scale up to 1.5 times the original size */
}

footer {
    text-align: center; /* Center the text */
    padding: 20px 0; /* Add padding for spacing */
    background-color: #1E1E1E; /* Ensure the background color matches the header */
    position: relative; /* Keep it at the bottom but allow for flex growth */
    width: 100%; /* Full width */
    flex-shrink: 0; /* Prevent shrinking */
}

/* Add this animation at the end of the file */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Error message styling */
.error-message {
    position: fixed;
    top: 20%; /* Position the message 20% from the top of the screen */
    left: 50%; /* Center the message horizontally */
    transform: translateX(-50%); /* Center the message horizontally */
    background-color: #ff4c4c; /* Red background for the error message */
    color: white; /* White text color */
    padding: 10px 20px; /* Padding around the text */
    border-radius: 5px; /* Rounded corners */
    font-size: 1.1em; /* Slightly larger font size */
    opacity: 0; /* Start with the message invisible */
    animation: fadeInOut 3s ease forwards; /* Fade-in animation */
}

@keyframes fadeInOut {
    0% { opacity: 0; } /* Start invisible */
    10% { opacity: 1; } /* Fade in */
    90% { opacity: 1; } /* Stay visible */
    100% { opacity: 0; } /* Fade out */
}

.fade-out {
    animation: fadeOut 5s ease forwards; /* Fade-out animation */
}

@keyframes fadeOut {
    from { opacity: 1; } /* Start fully visible */
    to { opacity: 0; } /* End invisible */
}

/* Media query for mobile devices */
@media only screen and (max-width: 768px) {
    .header-container {
        flex-direction: column; /* Stack elements vertically */
        align-items: flex-start; /* Align items to the start */
        padding: 10px; /* Add padding */
    }

    nav ul {
        flex-direction: column; /* Stack nav items vertically */
        gap: 5px; /* Reduce gap between items */
        width: 100%; /* Full width for nav */
        padding: 0; /* Remove padding */
        margin-top: 10px; /* Add margin to separate from header */
    }

    .logo-image {
        width: 80px; /* Smaller logo for mobile */
        margin-bottom: 10px; /* Add margin below logo */
    }

    .search-container {
        flex-direction: column; /* Stack input and buttons vertically */
        align-items: center;
        width: 100%; /* Full width */
        margin-top: 10vh; /* Adjust top margin */
    }

    .search-container input,
    .search-container button {
        width: 90%; /* Full width with some margin */
        max-width: 300px; /* Limit max width */
        margin: 5px 0; /* Add margin around elements */
    }

    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Adjust grid for smaller screens */
        gap: 10px; /* Reduce gap between grid items */
        padding: 0 10px; /* Add padding to grid */
    }

    .grid-item {
        padding: 10px; /* Add padding inside grid items */
    }

    .btc-wallet {
        flex-direction: column; /* Stack elements vertically */
        align-items: flex-start; /* Align to start */
        margin-left: 0; /* Remove left margin */
        margin-top: 10px; /* Add margin for spacing */
    }

    .btc-qr {
        margin-left: 0; /* Remove left margin */
        margin-top: 10px; /* Add margin above QR code */
    }

    footer {
        padding: 15px 0; /* Adjust padding for mobile */
    }

    .error-message {
        font-size: 1em; /* Adjust font size for mobile */
        padding: 8px 15px; /* Adjust padding */
        width: 90%; /* Full width with some margin */
        max-width: 300px; /* Limit max width */
    }
}

/* Styling for the total title count */
.title-count {
    margin-top: 15px; /* Space above the count */
    font-size: 1.1em; /* Slightly larger font size */
    color: #FFFFFF; /* Default color for text */
    text-align: center; /* Center align the text */
}

/* Styling for the red number */
.red-number {
    color: #FF0000; /* Red color for the number */
}

/* Remove overflow: hidden from the body to allow scrolling */
body {
    margin: 0;
    background-color: #121212;
    color: #FFFFFF;
}

/* Create a particles container to contain the moving shapes */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Ensure the particles are behind everything */
    overflow: hidden; /* Keep the shapes within the screen bounds */
}

.shape {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 255, 255, 0.7);
    border-radius: 50%;
    animation: float 10s linear infinite;
    pointer-events: none;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(-1200px) translateX(300px);
    }
}

/* Dropdown menu styles */
nav ul {
    position: relative;
}

nav ul li {
    position: relative;
    display: inline-block; /* Ensure that the list items align horizontally */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #333;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown-content li {
    display: block;
    text-align: left;
}

.dropdown-content li a {
    padding: 10px;
    text-decoration: none;
    display: block;
    color: #fff;
    background-color: #333;
}

.dropdown-content li a:hover {
    background-color: #1E90FF;
}

/* Show the dropdown when hovering over the dropdown link */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Style the dropdown trigger */
.dropdown {
    color: #BBBBBB;
    text-decoration: none;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.dropdown:hover {
    color: #FFFFFF; /* Change color on hover */
}

/* Style for active page link */
.active {
    background-color: #1E90FF; /* Highlight color for the active link */
    color: #FFFFFF; /* Make text white when active */
}