:root{
  --bg:#020308;
  --fg:rgba(255,255,255,.88);
  --muted:rgba(255,255,255,.62);
  --cyan:#27e7f2;
  --pink:#ff6fae;
  --border:rgba(255,255,255,.10);
  --panel:rgba(255,255,255,.04);
  --glow-cyan:0 0 22px rgba(39,231,242,.55);
  --glow-pink:0 0 22px rgba(255,111,174,.45);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  position:relative;
  margin:0;
  min-height:100vh;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: radial-gradient(1100px 650px at 15% 12%, rgba(39,231,242,.14), transparent 60%),
              radial-gradient(900px 520px at 92% 18%, rgba(255,111,174,.12), transparent 62%),
              radial-gradient(700px 500px at 85% 85%, rgba(255,111,174,.08), transparent 65%),
              var(--bg);
  color:var(--fg);
  overflow-x:hidden;
}
main.container{min-height: calc(100vh - 170px);}
a{color:inherit; text-decoration:none}

/* Buttons (used for description "More/Less") */
.btn{
  appearance:none;
  border:none;
  color: var(--pink);
  background: transparent;
  border-radius:0;
  padding:0;
  cursor:pointer;
  font-weight:600;
  letter-spacing:.2px;
  transition: color .12s ease, transform .12s ease;
}
.btn:hover{color: var(--cyan); transform: translateY(-1px);}
.btn:active{transform: translateY(0px);}
.btn:focus{outline:none; text-decoration:underline;}
header{
  position:sticky; top:0;
  padding:10px 14px;
  backdrop-filter: blur(10px);
  background: rgba(5,6,10,.65);
  border-bottom: 1px solid rgba(255,255,255,.06);
  z-index:10;
}
#site-logo{width:clamp(96px, 18vw, 160px); height:auto; opacity:.9; display:block}
.container{max-width:1200px; margin:0 auto; padding:18px 16px}
#nft-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap:16px;
}
.nft{
  position:relative;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.25);
  border-radius:16px;
  overflow:hidden;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.nft::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  padding:1px;
  background: linear-gradient(130deg, var(--pink), var(--cyan));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity:0;
  pointer-events:none;
  transition: opacity .12s ease;
}
.nft:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0);
  box-shadow: 0 8px 26px rgba(39,231,242,.22), 0 6px 20px rgba(255,111,174,.18);
}
.nft:hover::after{
  opacity:1;
}
.image-wrapper{
  width:100%;
  aspect-ratio: 1 / 1;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.45);
}
.image-wrapper img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.nft h2{
  font-size:14px;
  font-weight:600;
  letter-spacing:.2px;
  margin:10px 12px 12px;
  color: rgba(255,255,255,.92);
}
.loading{opacity:.6; filter: contrast(120%) saturate(120%); }
.loaded{opacity:1}

.single-wrap{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
}
@media (max-width:900px){
  .single-wrap{grid-template-columns:1fr}
}
.viewer{
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  overflow:hidden;
  background: rgba(0,0,0,.25);
}
.viewer img{
  width:100%;
  height:auto;
  display:block;
  background: rgba(0,0,0,.55);
}
.panel{
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background: rgba(0,0,0,.25);
  padding:14px 14px 12px;
}
#nft-title{
  margin:0 0 8px;
  font-size:22px;
  line-height:1.15;
}
#nft-description{
  margin:0 0 12px;
  color: rgba(255,255,255,.80);
}
#nft-traits{
  display:grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 88px;
  gap:10px;
}
.trait-box{
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:10px;
  background: rgba(0,0,0,.25);
  min-height:88px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  overflow:hidden;
  position:relative;
}
.trait-key{
  font-size:12px;
  color: rgba(39,231,242,.95);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.trait-value{
  font-size:13px;
  color: rgba(255,255,255,.85);
  margin-top:6px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.trait-box:hover{
  border-color: rgba(255,111,174,.45);
  box-shadow: 0 8px 22px rgba(255,111,174,.16);
}
.trait-box::after{
  content: attr(data-full);
  position:absolute;
  left:8px;
  right:8px;
  bottom:calc(100% + 8px);
  padding:8px 10px;
  border:1px solid rgba(39,231,242,.45);
  border-radius:10px;
  background: rgba(2,3,8,.96);
  color: rgba(255,255,255,.95);
  font-size:12px;
  line-height:1.35;
  white-space:normal;
  opacity:0;
  transform: translateY(4px);
  pointer-events:none;
  transition: opacity .12s ease, transform .12s ease;
  z-index:4;
}
.trait-box:hover::after{
  opacity:1;
  transform: translateY(0);
}
.links{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}
.links a{
  border:1px solid rgba(255,255,255,.10);
  padding:10px 12px;
  border-radius:999px;
  background: rgba(0,0,0,.25);
  transition: border-color .12s ease;
  font-size:13px;
}
.links a:hover{border-color: rgba(255,111,174,.45);}
.back{
  display:inline-flex;
  gap:8px;
  align-items:center;
  color: rgba(255,255,255,.85);
  border:1px solid rgba(255,255,255,.10);
  padding:8px 12px;
  border-radius:999px;
  background: rgba(0,0,0,.25);
}
#matrix{
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.12;
  z-index:-1;
  display:grid;
  grid-template-columns: repeat(var(--num-columns), 1fr);
}
#matrix span{
  display:block;
  animation: fall linear infinite;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
}
.octocore-glow{
  color: var(--pink) !important;
  text-shadow: var(--glow-pink);
}
@keyframes fall{
  from{transform: translateY(-10vh); opacity:.0}
  to{transform: translateY(110vh); opacity:1}
}

.header-logo{width:clamp(96px, 16vw, 140px); height:auto; opacity:.9}


/* === Gallery image containment fix === */
.nft .image-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.nft .image-wrapper img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain; /* show full artwork, no crop */
}

.nft {
  padding: 8px;
}


/* === v4 overrides: smaller header + fit art === */
header{
  padding:4px 8px !important;
}
#site-logo, .header-logo{
  width:clamp(52px, 8vw, 92px) !important;
  height:auto !important;
}
.container{
  padding:12px 12px !important;
}

/* Remove gallery title if present */
#gallery-title{display:none !important;}

/* Gallery: show full art, no crop */
.image-wrapper{background: rgba(0,0,0,.45);}
.nft .image-wrapper{
  aspect-ratio:auto !important;
  height:200px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
}
.nft .image-wrapper img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
}

/* Single view: fit tall pieces in viewport */
.viewer{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:10px !important;
  max-height: calc(100vh - 120px) !important;
}
.viewer img{
  width:auto !important;
  height:auto !important;
  max-width:100% !important;
  max-height: calc(100vh - 160px) !important;
  object-fit:contain !important;
}


/* Single description: clamp + more/less */
.desc-wrap{display:flex; flex-direction:column; gap:10px}
#nft-description.clamp{display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden}
#nft-description.clamp.expanded{display:block; overflow:visible}
#desc-toggle{
  align-self:flex-start;
  color: var(--pink);
  margin-bottom: 4px;
}

.platforms-title{
  margin:14px 0 10px;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.12em;
  color: var(--cyan);
}
.platforms{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.platform-btn{
  width:48px;
  height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid transparent;
  border-radius:12px;
  background:
    linear-gradient(rgba(0,0,0,.30), rgba(0,0,0,.30)) padding-box,
    linear-gradient(130deg, var(--pink), var(--cyan)) border-box;
  transition: transform .12s ease, box-shadow .12s ease;
}
.platform-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(39,231,242,.18), 0 6px 16px rgba(255,111,174,.16);
}
.platform-btn img{
  width:28px;
  height:28px;
  object-fit:contain;
}

.site-footer{
  margin-top:20px;
  border-top:1px solid rgba(255,255,255,.08);
  background: rgba(2,3,8,.58);
}
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.footer-brand{
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: rgba(255,255,255,.82);
}
.footer-links{
  display:flex;
  align-items:center;
  gap:10px;
}
.footer-icon-link{
  width:auto;
  height:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:none;
  background: transparent;
  padding:0;
  opacity:.9;
  transition: opacity .12s ease, transform .12s ease;
}
.footer-icon-link:hover{
  opacity:1;
  transform: translateY(-1px);
}
.footer-icon-link img{
  width:24px;
  height:24px;
  object-fit:contain;
}
.footer-icon-link .ih0dl-footer-logo{
  width:34px;
  height:34px;
}
