/* Base styles (Dark Mode) */
body {
    font-family: 'Arial', sans-serif;
    background-color: #1e1e2e; /* Base */
    color: #cdd6f4; /* Text */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, filter 0.3s ease;
}

header {
    background-color: #1e1e2e; /* Surface0 */
    color: #eff1f5; /* Text */
    text-align: center;
    padding: 1em 0;
    box-shadow: 0 4px 6px rgba(203, 166, 247, 0.8);
    border-bottom: 2px solid #cba6f7; /* Mauve for a subtle accent */
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    padding: 2em;
    padding-bottom: 140px; /* Adjust this value based on the footer height */
}

/*Github Corner Settings*/
.github-corner:hover .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
}

@keyframes octocat-wave {
    0%, 100% { transform: rotate(0); }
    20%, 60% { transform: rotate(-25deg); }
    40%, 80% { transform: rotate(10deg); }
}

@media (max-width: 500px) {
    .github-corner:hover .octo-arm { animation: none; }
    .github-corner .octo-arm { animation: octocat-wave 560ms ease-in-out; }
}

/* Smooth transition for color changes */
.github-icon, .corner-fill {
    transition: fill 0.3s ease, color 0.3s ease;
}

/* Light mode (default) */
.corner-fill {
    fill: #313244; /* Black corner */
}

.github-icon {
    color: #eff1f5; /* White octocat */
}

/* Dark mode */
body.dark-mode .corner-fill {
    fill: #eff1f5; /* White corner */
}

body.dark-mode .github-icon {
    color: #151513; /* Black octocat */
}

/*NFT Items Styles*/
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0; /* Make sure there's no margin causing overflow */
    gap: 3em; /* Adjust the gap between items */
}


.nft-item {
    position: relative;
    width: 100%; /* Ensures it doesn't exceed the container width */
    max-width: 400px; /* Limits the maximum width */
    height: 500px; /* Adjust based on your design */
    background-color: #1e1e2e;
    border-radius: 16px;
    overflow: hidden; /* Prevents any content from overflowing */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box; /* Include padding in width and height calculations */
    perspective: 1000px; /* Adjust for the depth of the flip */
    transition: transform 0.6s ease; /* Smooth transition for flip */
}

.nft-item.flip .nft-front {
    transform: rotateY(180deg); /* Flip the front side */
}

.nft-item.flip .nft-back {
    transform: rotateY(0deg); /* Show the back side */
}

.nft-front, .nft-back {
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s ease; /* Smooth transition for flip */
    position: absolute;
    top: 0;
    left: 0;
}

.nft-front {
    z-index: 2;
}



.three-dots {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.3s ease;
}

.three-dots:hover {
    background: rgba(250, 179, 135, 0.9);
}

.three-dots .middle-dot {
    width: 10px;
    height: 10px;
    background: #1e1e2e;
    border-radius: 50%;
}

.nft-item.flip .flip-back-button {
    display: flex; /* Show button on the back */
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.nft-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease; /* Smooth transition for zoom */
}

.nft-item .top-bar,
.nft-item .description-container {
    position: absolute;
    width: 100%;
    color: #1e1e2e; /* Darker text color */
    background: rgba(239, 241, 245, 0.5); /* Light background with transparency */
    text-align: center;
    padding: 0.5em 1em;
    box-sizing: border-box;
    z-index: 2; /* Ensure it is above other content */
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0; /* Hidden by default */
}

.nft-item:hover .top-bar,
.nft-item:hover .description-container {
    opacity: 1; /* Show the top bar and description */
    transform: translateY(0); /* Slide into view */
}

.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    padding: 0.5em 1em;
    background-color: rgba(239, 241, 245, 0.5);
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    justify-content: center; /* Centers the content */
    align-items: center; /* Aligns the content to the left */
    box-sizing: border-box;
    z-index: 2;
    transform: translateY(-100%);
}



.description-container {
    bottom: 0; /* Position at the bottom of the card */
    padding: 1em; /* Consistent padding */
    transform: translateY(100%);
    border-radius: 0 0 16px 16px; /* Rounded edges at the bottom */
}

.metadata-title {
    font-size: 1.3em; /* Fixed font size for title */
    font-weight: bold;
    margin: 0;
    padding: 0.5em;
    color: #1e1e2e; /* Dark text color */
    background-color: rgba(69, 71, 90, 0.2); /* Slightly transparent background matching NFT background */
    border-radius: 8px; /* Rounded corners */
    text-align: center; /* Center title text */
    width: 100%; /* Full width to ensure alignment */
}

.metadata-blockchain a {
    color: #1e1e2e; /* Highlight color for contract address */
}

.metadata-blockchain a:hover {
    text-decoration: none;
    color: #f38ba8;
}

/* Footer Styles */
footer {
    background-color: rgba(49, 50, 68, 0.9); /* Surface0 with slight transparency */
    color: #cdd6f4; /* Text */
    padding: 1em 2em; /* Adjust padding */
    box-shadow: 0 -4px 6px rgba(203, 166, 247, 0.8); /* Slight shadow */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transform: translateY(100%); /* Initially hidden */
    opacity: 0; /* Initially hidden */
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out, background-color 0.3s ease, color 0.3s ease; /* Smooth transitions */
   
}

/* Footer styles for light mode */
body.light-mode footer {
    background-color: rgba(255, 255, 255, 0.3); /* Light transparent background for footer */
    color: #1e1e2e; /* Text color for footer */
    box-shadow: 0 -4px 6px rgba(180, 190, 254, 0.8); /* Light shadow for footer */
}


/* Footer content alignment */
.footer-content {
    text-align: center;
}

.social-media a {
    margin: 0 0.5rem;
    display: inline-block;
}

.social-media img {
    width: 24px;
    height: 24px;
    vertical-align: middle; /* Aligns the icons properly */
}


footer.hidden {
    transform: translateY(100%);
}

body.blur {
    filter: blur(8px);
    overflow: hidden; /* Prevent scrolling when blurred */
}

.nft-item.zoomed {
    position: fixed; /* Fix position to overlay the entire viewport */
    top: 0;
    left: 0;
    width: 100vw; /* Full viewport width */
    height: 100vh; /* Full viewport height */
    z-index: 1000; /* High z-index to overlay other content */
    transition: transform 0.3s ease;
}

.nft-item:hover .nft-image {
    transform: scale(1.2); /* Zoom in on hover */

}


.nft-item.zoomed .nft-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.2); /* Center the image and scale */
    object-fit: contain; /* Maintain aspect ratio */
}

.nft-item.zoomed .description-container,
.nft-item.zoomed .top-bar {
    position: fixed;
    width: 100%;
    z-index: 1001; /* Ensure above the image */
    text-align: center;
}

.nft-item.zoomed .description-container {
    bottom: 10%;
    left: 0;
}

.nft-item.zoomed .top-bar {
    top: 10%;
    background: rgba(203, 166, 247, 0.9); /* Mauve with opacity */
}

.nft-back {
    z-index: 1;
    transform: rotateY(-180deg); /* Initial state for back */
    background-color: #cba6f7; /* Background color */
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
    color: #1e1e2e;
    font-size: 1.2em; /* Responsive font size for back text */
    box-sizing: border-box;
    overflow: hidden; /* Prevent overflow */
}

.back-title {
    font-family: 'Times New Roman', serif; /* Different font family for back text */
    font-size: 1.5em;
    font-weight: bold;
    color: #1e1e2e; /* Prominent color */
    margin-bottom: 0.5em; /* Margin to create space between title and other text */
}

.attribute-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: 'Arial', sans-serif;
    font-size: 1.1em;
    text-align: left; /* Align text to the left */
}

/* Toggle Button Style */
.mode-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: transparent;
    border: none;
    font-size: 2em;
    cursor: pointer;
    transition: transform 0.3s ease;
    color: inherit; /* Inherit color based on mode */
}

.mode-toggle:hover {
    transform: scale(1.1);
}

.sun-moon-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Light Mode Styles */
body.light-mode {
    background-color: #eff1f5; /* Base color for light mode */
    color: #1e1e2e; /* Text color for light mode */
}

.light-mode header {
    background-color: #eff1f5; /* Light background for header */
    color: #1e1e2e; /* Text color for header */
    box-shadow: 0 4px 6px rgba(180, 190, 254, 0.8); /* Light shadow for header */
    border-bottom: 2px solid #b4befe; /* Mauve for a subtle accent */
}

.light-mode .nft-item {
    background-color: #eff1f5; /* White background for NFT items */
    color: #1e1e2e; /* Text color for NFT items */
    box-shadow: 0 8px 16px rgba(180, 190, 254, 0.8); /* Light shadow for NFT items */
}

body.light-mode .nft-back {
    background-color: #f1f1f1; /* Lighter background color for light mode */
    color: #cba6f7; /* Darker text color for better readability */
}



/* Dark Mode Styles */
body.dark-mode {
    background-color: #1e1e2e; /* Base color for dark mode */
    color: #cdd6f4; /* Text color for dark mode */
}

.dark-mode header {
    background-color: #1e1e2e; /* Dark background for header */
    color: #cdd6f4; /* Text color for header */
}

.dark-mode .nft-item {
    background-color: #1e1e2e; /* Dark background for NFT items */
    color: #cdd6f4; /* Text color for NFT items */
    box-shadow: 0 8px 16px rgba(203, 166, 247, 0.8); /* Light shadow for NFT items */
}

.dark-mode footer {
    background-color: rgba(49, 50, 68, 0.9); /* Dark transparent background for footer */
    color: #cdd6f4; /* Text color for footer */
}


/* Dark Mode Styles */
body.dark-mode .nft-back {
    background-color: #1e1e2e; /* Mauve background color for dark mode */
    color: #b4befe; /* Dark text color for dark mode */
    
}
