body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    min-height: 100vh;
    font-family: "メイリオ", Meiryo, "ＭＳ Ｐゴシック", "MS PGothic", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, sans-serif;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    animation: randomBG 45s infinite alternate; /* Change color every 10s */
}

@font-face {
  font-family: 'Ber Font';
  src: url('/memefont.otf') format('opentype');
  font-display: swap;
}

/* Define a cycle of random colors */
@keyframes randomBG {
    0%   { background-color: #5da959; } /* Red-Orange */
    25%  { background-color: #8a59a9; } /* Green */
    50%  { background-color: #59a9a1; } /* Blue */
    75%  { background-color: #a9595f; } /* Pink */
    100% { background-color: #a98759; } /* Yellow */
}

.altfont {
    font-family: 'Ber Font', sans-serif;
    font-weight: 100;
    font-style: normal;
    line-height: 130%;
}
.highlight {
    background-color: rgba(84, 186, 77, 0.388);
    border-radius: 8px;
}
h1,h2,h3,h4,h5,h6 {
    font-family: 'Ber Font', sans-serif;
    font-weight: 100;
    font-style: normal;
    line-height: 130%;
}
.wiggle {
    animation: rotateWiggle 4s infinite ease-in-out;
}
@keyframes rotateWiggle {
  0%   { transform: rotate(-2deg); }
  50%  { transform: rotate(2deg); }
  100%  { transform: rotate(-2deg); }
}
h1 {
    font-size: 40px;
}
h2 {
    font-size: 23px;
}
h3 {
    font-size: 22px;
}
h4 {
    font-size: 20px;
}
p.lead {
    font-size: 18px;
}
p {
    font-size: 15px;    
    line-height: 120%;
}

/* Style for the logo */ 
#logo {
    position: fixed;
    top: 5px; /* Distance from the top of the page */
    left: 20px; /* Distance from the left of the page */
    width: 80px; /* Adjust size as needed */
    height: auto;
    z-index: 1000; /* Ensure it stays above other elements */
    cursor: pointer;
    font-family: 'Ber Font', sans-serif;
    font-size: 52px;
    color: #ffffff;
    transform: rotate(-5deg);
}

.head{
    width: 100%;
    min-height: 80px;
}
.foot{
    width: 100%;
    min-height: 180px;
}
#wrapper {
  width: calc(100% - 40px); /* leave space for 20px left + right */
  margin: 0 auto;
  padding: 0;
}
.banner {
    border: 0;
    padding: 0;
    margin: 0 auto 0 auto;
    width: 100%; /* Set width to 90% of the viewport */
    max-width: 800px; /* Set a maximum width for larger screens */
    text-align: center; 
}
.container {
    background: #ffffff;
    /*
    border-bottom: black 5px solid;*/
    border-radius: 8px;
    box-shadow: 0 10px 8px rgba(0, 0, 0, 0.2);
    padding: 10px 20px 20px 20px;
    width: 100%; /* Set width to 90% of the viewport */
    max-width: 800px; /* Set a maximum width for larger screens */
  margin: 0 auto 20px auto;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden; /* Ensures container expands to include floated children */
}
.tcontainer {
    background: transparent;
    padding: 0;
    width: 100%; /* Set width to 90% of the viewport */
    max-width: 100%; /* Set a maximum width for larger screens */
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden; /* Ensures container expands to include floated children */
}

.w800{
    max-width: 800px;
    margin: 0 auto;
}

.white{
    color: #ffffff;
}

.h1size{
  font-size: 40px;
  line-height: 100%;
}

.hcontainer {
    background: #ffffff;
    /**/
    box-shadow: 0 10px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    float:left;
    width: 100%; /* Set width to 90% of the viewport */
    min-width: 395px; /* Set a maximum width for larger screens */
    box-sizing: border-box;
    margin-bottom: 20px;
    text-align: center;
}
/* Container layout */
#results {
  display: flex;
  flex-wrap: wrap;
  column-gap: 10px;       /* horizontal spacing between cards */
  row-gap: 10px;          /* vertical spacing */
  justify-content: space-between;
  padding: 0;
  margin: 0;
}

.nft-showcase {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  max-width: 1200px;
  gap: 10px;
  padding: 20px 0;
  margin: 0 auto;
  scroll-snap-type: x mandatory;  /* optional smooth snap */
  -webkit-overflow-scrolling: touch; /* for iOS momentum scroll */
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;           /* Firefox */
  scrollbar-color: #bbb transparent;
}

/* Chrome, Edge, Safari */
.nft-showcase::-webkit-scrollbar {
  height: 6px;
}

.nft-showcase::-webkit-scrollbar-track {
  background: transparent;
}

.nft-showcase::-webkit-scrollbar-thumb {
  background-color: #bbb;
  border-radius: 3px;
}

/* Hide scrollbar arrows */
.nft-showcase::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

.nft-showcase .nft-container-wrapper {
  flex: 0 0 auto;          /* ✅ prevents shrinking */
  max-width: 220px;        /* ✅ or any size that fits well in horizontal list */
  width: auto;
}

/* NFT card wrapper */
.nft-container-wrapper {
  background: #ffffff;
  box-shadow: 0 10px 8px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  flex: 0 1 calc(20% - 10px); /* 5 columns (20% each - 10px for gap) */
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; 
  align-items: center;     /* ✅ Vertical center */
  justify-content: center; /* Optional: horizontal center */
}

/* Tablet: 3 columns */
@media (max-width: 1024px) {
  .nft-container-wrapper {
    flex: 0 1 calc(33.3333% - 8px);
  }
}

/* Mobile: 2 columns */
@media (max-width: 600px) {
  .nft-container-wrapper {
    flex: 0 1 calc(50% - 6px);
  }
}

/* NFT card */
.nft-container {
  text-align: left;
  overflow: hidden;
  width: 100%;
}


.nft-content{
    padding: 0 10px 10px 10px;
}
.nft-traitbox{
    padding: 1%;
    background-color: #f7f7f7;
    width:48%;
    float:left;
    margin: 0 0px 5px 0;
}
p.nft-trait{
    padding: 0 0 3px 0;
    margin: 0;
    text-transform: uppercase;
    font-size: 16px;
    font-family: 'Ber Font', sans-serif;
    overflow: hidden;
    white-space: nowrap; /* Prevents text from wrapping */
    text-overflow: ellipsis; /* Adds "..." if text overflows */
    max-width: 100%; /* Ensures it doesn't exceed the parent container */
}
p.nft-traitcontent {
    padding: 0;
    margin: 0;
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap; /* Prevents text from wrapping */
    text-overflow: ellipsis; /* Adds "..." if text overflows */
    max-width: 100%; /* Ensures it doesn't exceed the parent container */
}
.nft-container img , .nft-container-wrapper img {
    display:block; 
    width:100%;
}
/* Container for the game section */
.game-container {
    width: 90%; /* Set width to 90% of the viewport */
    max-width: 800px; /* Set a maximum width for larger screens */
    box-sizing: border-box;
    float: left; /* Keeps it aligned left */
     /* Optional: rounded corners for the container */
}

/* Styles for images inside the container */
.game-container img {
    display: block;
    width: 100%;
     /* Adds rounded corners to images */
}

/* Media Query for larger screen sizes (desktop view) */
@media (min-width: 768px) {
    .game-container {
        display: grid;
        gap: 20px; /* Adds space between columns */
        grid-template-columns: 1fr 1fr; /* Aligns into two columns for desktop */
    }
    .hcontainer {
        width:50%;
    }
}

/* Style for the game name overlayed on the image */
.dashboard-actions {
    width:100%;
    position: relative;
    display: inline-block;
    margin-bottom: 20px; /* Optional: space between buttons */
    aspect-ratio: 16 / 9; /* Set aspect ratio to 16:9 */
    overflow: hidden; /* Hide any overflowing content */
}

.dashboard-actions img {
    display: block;
    object-fit: cover;
    width: 100%;
    aspect-ratio: 16 / 9; /* Set aspect ratio to 16:9 */
    overflow: hidden; /* Hide any overflowing content */
     /* Optional: to give rounded corners to the image */
}

.dashboard-actions .game-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white; /* Make the text color contrast with the image */
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    background: rgba(0, 0, 0, 0.5); /* Optional: to make the text stand out */
    padding: 10px 20px;
    border-radius: 5px; /* Optional: rounded corners for the text background */
    cursor: pointer;
}

.table-wrapper {
    overflow-x: auto; /* Only the table will have horizontal scrolling */
}

#footer {
    background-color: #100521;
    border-radius: 10px 10px 0 0;
    min-height: 110px;
    width: 100%; /* Set width to 90% of the viewport */
    max-width: 800px; /* Set a maximum width for larger screens */
    position: fixed;
    bottom: 0;
    z-index: 900; /* Ensure it's above other elements */
    display: table;
    clear: both;
}
.pfp{
    width: 30%;
    position: absolute;
    bottom: 0;
    left:0;
}
.pfp img {
    max-width: 100%;
    display: block;
}
.user{
    color: #ffffff;
    width: 70%;
    position: absolute;
    top: 0;
    right: 0;
    text-align: left;
}
button {
    background-color: #f4f4f4;
    font-family: "メイリオ", Meiryo, "ＭＳ Ｐゴシック", "MS PGothic", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, sans-serif;
    border: none;
    color: #000000;
    padding: 8px 16px;
    text-align: center;
    display: inline-block;
    font-size: 16px;
    margin: 5px;
    cursor: pointer;
    border-radius: 8px;
    box-sizing: border-box;
  }
button svg {
  width: 24px;
  height: 24px;
  display: block;
}
.footer-button {
    background-color: #c7e3bf;
    color: black;
  }
  .black-button {
    background-color: black;
    color: white;
  }
  #connect-wallet{
    background-color: #4c2fa2;
    color: #fff;
  }
  .logout-button {
    background-color:#ff4b5c;
    color: white;
}
.twitter-login-btn{
    background-color: #000000;
    color: white !important;
}
#play-button {
    background-color: #04AA6D;
    color: white;
}
#referral {
    cursor: pointer;
    background-color: #f4f4f4;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    border: none;
    padding: 10px 20px;
    width: auto;
    text-align: center;
    font-size: 14px;
    text-decoration: none; 
    border-radius: 8px;
}
#referral:hover {
    background-color: #c7e3bf;
    color: black;
}

/* Fixed open menu button in the top-right corner */
#open-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin:0;
  background-color: #c7e3bf;
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mute {
  position: fixed;
  top: 20px;
  right: 74px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin:0;
  background-color: #ffffff;
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#open-menu:hover {
    background-color: #5a725a; /* Darker shade on hover */
    color: white;
}

/* Overlay menu styles */
.menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 300px;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    overflow-x: hidden;
    transform: translateX(100%); /* Start off-screen */
    transition: transform 0.3s ease; /* Smooth slide effect */
    z-index: 1000;
    padding-top: 60px; /* Add some space for the close button */
    padding-top: 60px; /* Add some space for the close button */
}


/* Menu content */
.menu-overlay ul {
    list-style-type: none;
    padding: 0;
}

.menu-overlay li {
    padding: 15px 20px;
}

.menu-overlay li a {
    color: white;
    text-decoration: none;
    font-size: 22px;
}

/* Open class to slide in the menu */
.menu-overlay.open {
    transform: translateX(0); /* Slide in */
}

/* Close button styling */
#close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}
        /* Minimalist table CSS with consistent row height and overflow handling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

thead {
    background-color: #f4f4f4;
    text-transform: uppercase;
    color: #333;
}

th, td {
    padding: 10px;
    text-align: left;
    font-size: 14px;
    height: 20px; /* Set a consistent row height */
    overflow: hidden; /* Hide overflow */
    white-space: nowrap; /* Prevent text from wrapping */
    text-overflow: ellipsis; /* Add ellipsis (...) to indicate overflowed text */
}

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

tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

tbody tr:hover {
    background-color: #f1f1f1;
}
a:link , a:visited {
    color: blue;
  }
  a:hover , a:active {
    color: red;
  }
  
  select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #f4f4f4;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><polygon points="0,0 10,0 5,5" fill="black"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 10px;
    border: 1px solid #f4f4f4;
    color: #000000;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 20px;
    margin: 10px 0 0 0;
    width: 100%;
    text-align: center;
    border-radius: 8px;
    box-sizing: border-box;
}

select:focus {
    outline: none;
    border: 1px solid #04AA6D;
}

select::-ms-expand {
    display: none;
}
.x-logo {
    width: 15px;
    height: 15px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='15' width='15' viewBox='0 0 512 512'%3E%3Cpath d='M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='15' width='15' viewBox='0 0 512 512'%3E%3Cpath d='M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z'/%3E%3C/svg%3E");
  }
  .lightbox {
    display: none; 
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    text-align: center;
}

.lightbox-content {
    max-width: 80%;
    max-height: 80vh;
    margin: auto;
    display: block;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* VOTING CSS */
/* Full screen confetti container */

/* Voting area - Always side by side */
.vote-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Each NFT takes 50% width */
.voter {
    width: 50%;
    text-align: center;
    cursor: pointer;
    position: relative;
}

/* NFT Image - Perfectly Square (No CLS) */
.voter img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-bottom: 5px solid #000; /* Border only on image */
    display: block;
}

/* ✅ Instant Grey Out Effect for Losing Image */
.grey-out {
    filter: grayscale(100%);
    opacity: 0.5;
    transition: opacity 0.2s ease-in-out; /* Faster transition */
}

/* ✅ Faster, More Dynamic Glow Effect for Winner */
.shiny-effect {
    position: relative;
    animation: shine 0.3s ease-in-out infinite alternate; /* 0.3s for speed */
}

/* ✅ Optimized Keyframes for a Faster Glow */
@keyframes shine {
    0% {
        filter: brightness(100%) contrast(100%);
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
    100% {
        filter: brightness(140%) contrast(120%);
        box-shadow: 0 0 15px rgba(255, 255, 255, 1);
    }
}


/* ✅ Mobile Fix: NFTs always side by side */
@media screen and (max-width: 600px) {
    .vote-container {
        flex-direction: row;
        justify-content: center;
    }

    .voter {
        width: 50%;
    }
    .plush-img {
    width: 50% !important;
  }

}

.vote-log-table {
    table-layout: fixed; /* Equal column widths */
}

.vote-log-table th, .vote-log-table td {
    text-align: center; /* Center align text */
}

.vote-log-table .winner {
    color: #28a745; /* Green for winner */
    font-weight: bold;
}

.vote-log-table .loser {
    color: #dc3545; /* Red for loser */
    font-weight: bold;
}

.vote-log-table .time-ago {
    color: #777;
    font-size: 14px;
}

/* Winner Effect: Smooth Zoom & Gold Glow */
.winner-effect {
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.9); /* Gold glow instead of border */
}

/* Grey Out Effect for Loser */
.grey-out {
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.15s ease-in-out;
    transform: scale(0.95); /* Slight shrink without causing CLS */
}
/* LICENSE */
.license-card {
  width: 100%;
  max-width: 600px;
  height: auto; /* ✅ keep responsive height */
  background: #fff url('images/licensebg.png') center center / cover no-repeat;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  margin: 0 auto;
  margin-bottom: 20px;
  /* Animation */
  transform: scale(0.3) rotate(-5deg);
  opacity: 0;
  animation: popIn 0.6s ease-out forwards;
  animation-fill-mode: forwards; /* ✅ keep final state */
}


/* Smooth scale + rotate in */
@keyframes popIn {
  0% {
    transform: scale(0.3) rotate(-5deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.05) rotate(-2deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(-1deg);
    opacity: 1; /* Keep visible! */
  }
}


/* Rows based on % heights (relative to parent height) */
.license-header {
  flex: 0 0 20%; /* 100px of 500 */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 2vw;
  font-weight: bold;
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  padding: 10px 0;
}

.license-header h2 {
  font-family: 'Georgia', serif;
  text-transform: uppercase;
  font-size: clamp(20px, 2.5vw, 28px); /* ✅ responsive but readable */
  margin: 0;
}

.license-header p {
  font-family: sans-serif;
  text-transform: uppercase;
  font-size: clamp(12px, 1.5vw, 16px); /* ✅ consistent across sizes */
  margin: 0;
  letter-spacing: 1px;
}

.license-main {
  flex: none;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  min-height: 0;
}

.license-photo {
  width: 37.5%;
  display: flex;
  align-items: center;     /* ✅ Vertical center */
  justify-content: center; /* ✅ Horizontal center */
  padding-left: 10px;
}

.license-photo img {
  max-height: 100%;
  max-width: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  mix-blend-mode: hard-light;
  display: block;
}


.license-info {
  flex: 1;
  padding: 1vw;
  font-size: 1.8vw;
}
.license-footer {
  height: 14%;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  overflow: hidden;
  font-size: clamp(10px, 1.4vw, 14px);
  font-family: 'Courier New', Courier, monospace;
  position: relative;
    background: #f7f7f7; /* Light background for footer */
}

.copy-text {
  flex: 1;
  padding-right: 32px; /* 👈 Enough space for icon */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.2;
  display: block;
  text-align: center;
  margin: 10px 0;
  cursor: pointer;
}

.copy-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  flex-shrink: 0;
  z-index: 2;
  background: #fff0; /* Transparent for safety */
}


@media (max-width: 600px) {
  .copy-text {
    justify-content: flex-start;     /* align left */
    text-align: left;
  }
}

.copy-value {
  display: inline;
}
.copied-msg {
  display: inline;
  color: green;
  font-weight: bold;
}

.license-table {
  all: unset;    
  width: 100%;
  display: table;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: sans-serif;
  font-size: 13px;
  margin:0 auto;
  background: transparent;
}
/* Reset for license table only */
.license-table td,
.license-table th {
  background-color: transparent !important;
  padding: 2px 4px;
  font-size: 13px;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  height: auto;
  padding-bottom: 5px;
}
.license-table tr {
  background-color: transparent !important;
}
.license-table tr:hover {
  background-color: transparent !important;
}
.license-table .label {
  text-transform: uppercase;
  font-size: clamp(8px, 1.5vw, 12px); /* ✅ better for all sizes */
  color: #000;
  font-family: 'Courier New', Courier, monospace;
}

.license-table .value {
  text-transform: uppercase;
  font-size: clamp(12px, 2.5vw, 18px); /* ✅ not too big, not too small */
  font-weight: bold;
  color: #000;
}