
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  position: relative;
  z-index: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #7b5cff, #c48fff, #ffb3ec);
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  cursor: url('meappng_32x32.png') 16 16, auto;
}


header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px;
  width: 100%;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 20;
}

.plogo-link img {
  height: 32px;   
  width: auto;
  display: block;
  transition: opacity 0.2s;
}

.plogo-link img:hover {
  opacity: 0.7;
}

.x-link, .lore-link {
  text-decoration: none;
  font-size: 2rem;
  font-weight: bold;
  color: white;
  transition: opacity 0.2s;
}
.x-link:hover, .lore-link:hover { opacity: 0.7; }


main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 15px;                 /* tighter spacing */
  padding: 50px 20px 30px;   /* less top padding */
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.coin-logo {
  width: 270px; 
  animation: float 4s ease-in-out infinite;
  position: relative;
  z-index: 11;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}


.address-box {
  display: inline-block;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 8px 18px;
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 11;
}

.address-text {
  font-size: 1rem;
  font-weight: bold;
  word-break: break-all;
}


.coin-video {
  width: 100%;
  max-width: 800px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 11;
}


#meep-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none !important;
}
#meep-container * { pointer-events: none !important; }

.meep {
  position: absolute;
  font-weight: bold;
  color: white;
  opacity: 0;
  animation: fadeMeep 5s forwards;
}

@keyframes fadeMeep {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}


@media (max-width: 480px) {
  .coin-logo { width: 160px; }
  .address-box { padding: 6px 12px; }
  .address-text { font-size: 0.9rem; }
  .coin-video { width: 95%; }
  body { cursor: auto; }
}



.header-right { display: flex; align-items: center; gap: 20px; }
.avatar-link {
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  padding: 6px 10px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 10px;
  backdrop-filter: blur(6px);
  background: rgba(255, 255, 255, 0.08);
  transition: opacity 0.2s, transform 0.02s ease;
}
.avatar-link:hover { opacity: 0.85; }
.avatar-link:active { transform: translateY(1px); }


.avatar-creator {
  margin-top: 30px;
  padding: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 16px;
  background: rgba(0,0,0,0.25);
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.avatar-creator h2 {
  margin-bottom: 15px;
  font-size: 1.5rem;
  color: #fff;
}
.ac-stage {
  width: 500px;
  height: 500px;
  margin: 0 auto 15px;
  border: 2px solid white;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}
.ac-stage canvas {
  width: 500px;
  height: 500px;
  display: block;
}
.ac-controls {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ac-controls label {
  color: #fff;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
#colorPicker {
  width: 50px;
  height: 32px;
  border: none;
  cursor: pointer;
  padding: 0;
}
#exportBtn, #downloadLink {
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: rgba(255,255,255,0.15);
  color: white;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s;
}
#exportBtn:hover, #downloadLink:hover {
  background: rgba(255,255,255,0.3);
}
@media (max-width: 560px) {
  .ac-stage, .ac-stage canvas { width: 100%; height: auto; aspect-ratio: 1 / 1; }
}

