@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

@font-face {
    font-family: 'profont';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/ProFontWindows.ttf') format('truetype');
    font-display: swap; 
}


@media (max-width: 900px) {
  .options {
  flex-wrap: wrap;
  justify-content: center;
  }
}

@keyframes moveBackground {
  0% { background-position: 0 0; }
  100% { background-position: 3000px 1000px; }
}

:root {
  --pink-main: #ffc0cb;
  --pink-light: #ffe4ec;
  --pink-dark: #ff9bb0;
  --accent: #b2b272;
  --text: #4a4a4a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: transparent;
  background-color: #f5f5dc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23b2b272' fill-opacity='0.4'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: moveBackground 200s linear infinite;
  color: var(--text);
  font-weight: 500;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.5px;
}
h1 {
  text-align: center;
}
a {
  text-decoration: none;
  
  color: black;
}

.container {
  min-height: 600px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}

.header {
  overflow: visible;

  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 20px;
  padding: 40px 20px;
  min-height: 140px;
  position: relative;

  background-color: #ffb6c1;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='20' viewBox='0 0 100 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21.184 20c.357-.13.72-.264 1.088-.402l1.768-.661C33.64 15.347 39.647 14 50 14c10.271 0 15.362 1.222 24.629 4.928.955.383 1.869.74 2.75 1.072h6.225c-2.51-.73-5.139-1.691-8.233-2.928C65.888 13.278 60.562 12 50 12c-10.626 0-16.855 1.397-26.66 5.063l-1.767.662c-2.475.923-4.66 1.674-6.724 2.275h6.335zm0-20C13.258 2.892 8.077 4 0 4V2c5.744 0 9.951-.574 14.85-2h6.334zM77.38 0C85.239 2.966 90.502 4 100 4V2c-6.842 0-11.386-.542-16.396-2h-6.225zM0 14c8.44 0 13.718-1.21 22.272-4.402l1.768-.661C33.64 5.347 39.647 4 50 4c10.271 0 15.362 1.222 24.629 4.928C84.112 12.722 89.438 14 100 14v-2c-10.271 0-15.362-1.222-24.629-4.928C65.888 3.278 60.562 2 50 2 39.374 2 33.145 3.397 23.34 7.063l-1.767.662C13.223 10.84 8.163 12 0 12v2z' fill='%23dc7e8c' fill-opacity='0.14' fill-rule='evenodd'/%3E%3C/svg%3E");
  
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28); 
  backdrop-filter: blur(4px); 
}

.header::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 0;
  width: 100%;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='18' viewBox='0 0 48 18'%3E%3Cpolygon points='0,0 12,18 24,0 36,18 48,0' fill='%23ffb6c1'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 48px 18px;
}



 .sponsor, .options {
   display: flex;
   align-items: center;
   justify-content: center;
   flex-direction: column;
   min-height: 12vh;
   min-width: 30vw;
}

.event-container {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 32px;
  max-height: 12vh;
  min-width: 150px;
  min-height: 150px;
  
}

.title-event {
  position: relative;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease;
}

.title-event:hover {
  transform: scale(1.02);
}

.title-event img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.title-event img:nth-child(1) {
  animation: title-spin 10s linear infinite;
}

.title-event img:nth-child(2) {
  transform: rotate(15deg);
}


@keyframes title-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


.title-desc {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  margin-top: 6px;
}

.title-image {
  width: clamp(60px, 24vw, 120px);
  height: clamp(60px, 24vw, 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid #ff91a9;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease;
}

.title-image:hover {
  transform: scale(1.02);
}

.title-image img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  animation: wiggle 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}

.options {
    flex-direction: row;
    gap: 25px;
}

.options > * {
    background-color: var(--pink-dark);
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
    border: 5px solid #ff91a9;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
      white-space: nowrap;
    transition: all 0.2s ease;
}

.options .auth-only {
  display: none;
}

.options .auth-only.is-auth {
  display: block;
}

.options > * > a {
  display: block;
  padding: 12px 15px;
  color: inherit;
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  fill: #4a4a4a;
  mask-size: cover;
}

.options > *:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.discord-btn {
  border: none;
  padding: 17px 20px;
  border-radius: 10px;
  background: #5865f2;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.discord-btn:hover {

  filter: brightness(1.05);
  border:none;
}

.discord-btn:active {
  transform: translateY(0);
}

.discord-btn svg {
  width: 22px;
  height: 22px;
}

.sponsor {
  color: black;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 1.5px;
  min-width: 20vw;
  text-align: center;
  position: relative;
  padding: 6px 24px;
  --sponsor-line-inset: 10px;
  transition: transform 0.2s ease;
}

a.sponsor {
  min-width: 15vw;
}


.sponsor::before,
.sponsor::after {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  margin: -20px;
  width: 1px;
  background: rgb(255, 107, 139);
}

.sponsor::before {
  left: var(--sponsor-line-inset);
}

.sponsor::after {
  right: var(--sponsor-line-inset);
}

.sponsor h3 {
  font-family: 'profont';
}

.sponsor-tagline {
  color: #C9056F;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.sponsor-logo {
  height: 24px;
  object-fit: contain;
  object-position: center;
  display: inline-block;
}

.mark-brown {
    color: transparent;
    font-family: 'profont';
    background: radial-gradient(circle, rgb(255, 255, 33), rgb(247, 70, 185), rgb(56, 206, 236), rgb(255, 135, 209)) 0% 0% / 200% 200% text;
}

.egg-grid {
  padding: 60px;
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.main-article-title {
  display: flex;
  justify-content: center;
  margin: 40px 0 6px;
  min-width: 8vw;
}

.main-article-title h1 {
  font-family: 'profont', 'Nunito', sans-serif;
  font-size: 2rem;
  letter-spacing: 1px;
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  color: var(--text);
}

.egg-container {
  overflow: hidden;
  cursor: pointer;
  border-top: 2px var(--pink-main) solid;
  border-bottom: 2px var(--pink-main) solid;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.495);
}

.egg-container-redeemed {
  background-color: rgba(234, 243, 222, 0.8);
  border-top-color: #d3e6b9;
  border-bottom-color: #d3e6b9;
}

.egg-stage {
  height: 300px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}


.egg-container:hover .egg-stage::after {
  opacity: 1;
}

.egg-actions {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%) translateY(6px);
  display: flex;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.egg-container:hover .egg-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

@media (hover: none), (pointer: coarse) {
  .egg-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
}

.egg-action {
  border: none;
  padding: 12px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
  cursor: pointer;
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.overlay-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 12px;
  gap: 10px;
}


.overlay-btn {
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  border: var(--pink-dark);
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.4s ease;
}

.overlay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.overlay-btn:active {
  background: var(--pink-dark);
}

.overlay-edit {
  background-color: var(--pink-light);
}

.overlay-delete {
  background-color: var(--pink-light);
  color: red;
}

.egg-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  filter: brightness(1.05);
}

.egg-action:active {
  background-color: violet;
  transform: translateX(1px);
}

.egg-like {
  background: rgb(9, 255, 0);
}

.egg-qrcode {
  background: rgb(74, 74, 74);
}

.egg-dislike {
  background: red;
}

.egg canvas {
  width: 100% !important;
  height: 100% !important;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.lock-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}


.egg-info {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 12px 14px 14px;
}

.egg-name {
  margin-bottom: 3px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--text);
}

.egg-creator {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  margin-bottom: 3px;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #666;
}

.egg-meta {
  margin-bottom: 0;
}

.creator-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

#backdrop {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
}

#backdrop.open {
  pointer-events: all;
}

#modal {
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

#modalStage {
  height: 280px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modalStage canvas {
  display: block;
}

#modalStageHint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

#modalClose {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#modalBody {
  padding: 22px 26px 26px;
}

#mName {
  margin-bottom: 4px;
}

#mPts {
  margin-bottom: 16px;
}

.hint-block {
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.hint-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hint-label {
  margin-bottom: 3px;
}

.hint-text {
  line-height: 1.5;
}

.info-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.info-block {
  padding: 12px 14px;
}

.info-label {
  margin-bottom: 5px;
}

.btn-row {
  display: flex;
  gap: 10px;
}

#claimBtn {
  flex: 1;
  padding: 13px;
  border: none;
  cursor: pointer;
}

#claimBtn:disabled {
  cursor: not-allowed;
}

/* overlay stuff */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 192, 203, 0.35);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 30px;
}

.overlay-box {
  width: min(720px, 92vw);
  height: min(360px, 75vh);
  background: white;
  border-radius: 18px;
  border: 3px solid #00000017;
  display: flex;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

@media (min-width: 761px) {
  .overlay-box {
    width: min(960px, 92vw);
    height: min(480px, 75vh);
  }

  .overlay-qrcode {
    width: min(680px, 92vw);
    height: min(760px, 90vh);
  }
}

.overlay-preview {
  flex: 1;
  height: 100%;
  position: relative;
  }

.overlay-preview::after {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 20px;
  right: 0;
  width: 2px;
  background: rgba(255, 145, 169, 0.5);
}

/* ai slop idk loool */
.overlay-info { flex: 1; padding: 24px 26px; display: flex; flex-direction: column; justify-content: flex-start; gap: 14px; min-width: 0; overflow-y: auto; }
.egg-label { font-size: 11px; font-weight: 500; color:  var(--text); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }
.egg-name { margin: 0 0 4px; font-size: 36px; font-weight: 500; overflow-wrap: anywhere; }
.egg-fields { display: flex; flex-direction: column; gap: 8px; }
.egg-row { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; }
.egg-key { font-size: 17px; color:  var(--text); min-width: 56px; padding-top: 2px; }
.egg-value { font-size: 18px; font-weight: 500; overflow-wrap: anywhere; }
.egg-hint, .egg-reward { font-size: 18px; color: var(--text); margin-top: 2px; overflow-wrap: anywhere; }
.egg-reward {color: blueviolet;}

.egg-redeem-badge { display: inline-flex; align-items: center; padding: 10px; border-radius: 999px; font-size: 17px; font-weight: 500; }
.egg-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.redeem-green  { background: #EAF3DE; color: #3B6D11; } .redeem-green  .egg-dot { background: #639922; }
.redeem-yellow { background: #FAEEDA; color: #854F0B; } .redeem-yellow .egg-dot { background: #EF9F27; }
.redeem-red    { background: #FCEBEB; color: #A32D2D; } .redeem-red    .egg-dot { background: #E24B4A; }

.overlay-qrcode {
  width: min(600px, 90vw);
  height: min(700px, 90vh);
  flex-direction: column;
}

.qrcode-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  min-height: 0;
}

.qrcode-display .qrcode-image {
  width: 100%;
  max-width: 400px;
  min-width: 280px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qrcode-display svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.qr-link-section {
  padding: 24px 20px;
  border-top: 2px solid rgba(255, 145, 169, 0.3);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.qr-link-url {
  padding: 12px 14px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 13px;
  color: #666;
  word-break: break-all;
  font-family: monospace;
  text-align: center;
}

.qr-link-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.qr-copy-btn {
  background: #ff91a9 !important;
  color: white !important;
  transition: all 0.2s ease !important;
}

.qr-copy-btn:hover {
  background: #ff6b8a !important;
}

.qr-copy-btn:active {
  transform: scale(0.98);
}

.qr-download-btn {
  background: #ffc0cb !important;
  color: #333 !important;
  transition: all 0.2s ease !important;
}

.qr-download-btn:hover {
  background: #ffaab7 !important;
}

.qr-download-btn:active {
  transform: scale(0.98);
}

@media (max-width: 760px) {
  .overlay-box {
    flex-direction: column;
    height: auto;
    max-height: 92vh;
  }

  .overlay-qrcode {
    width: min(95vw, 600px);
    height: auto;
  }

  .qrcode-container {
    padding: 20px 15px;
  }

  .qrcode-display {
    max-width: 300px;
  }

  .qr-link-buttons {
    grid-template-columns: 1fr;
  }

  .overlay-preview {
    min-height: 240px;
    align-items: center;
    justify-content: center;
  }

  .overlay-preview::after {
    top: auto;
    left: 20px;
    right: 20px;
    bottom: 0;
    width: auto;
    height: 2px;
  }

  .overlay-info {
    padding: 18px 20px 22px;
    align-items: flex-start;
  }

  .egg-name {
    font-size: 28px;
  }
}

.create-egg-layout, .rules-container {
  width: min(1100px, 94vw);
  margin: 80px auto 60px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

.create-egg-preview {
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 700px;
}

.create-egg-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: white;
  border: 2px solid rgba(255, 145, 169, 0.4);
  overflow: hidden;
  min-height: 600px;
}

.create-egg-preview-label {
  font-weight: 600;
  text-align: center;
  color: var(--text);
  letter-spacing: 0.3px;
}

.create-egg-form {
  width: 100%;
  margin: 0;
  text-align: center;
  padding: 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  display: grid;
  gap: 10px;
  min-height: 700px;
}

.rules-info, .rules-creator {
  width: 100%;
  margin: 0;
  text-align: center;
  padding: 25px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  display: grid;
  gap: 30px;
}

.rules-info {
  text-align: left;
}

.rules-header h1 {
  font-family: 'profont', 'Nunito', sans-serif;
  font-size: 2rem;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.rules-timer {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff3f7;
  border: 1px dashed rgba(255, 145, 169, 0.5);
  display: grid;
  gap: 6px;
  width: 100%;

}

.rules-timer-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a6b72;
}

.rules-timer-value {
  font-family: 'profont', 'Nunito', sans-serif;
  font-size: 20px;
  color: #4a4a4a;
  letter-spacing: 0.5px;
}

.rules-lede {
  font-size: 15px;
  color: #6a5b63;
  max-width: 520px;
}

.rules-section {
  padding: 14px 16px;
  background: #fff;
  border-radius: 12px;
  border: 2px solid rgba(255, 145, 169, 0.15);
}

.rules-section h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #5a4b52;
}

.leaderboard-title {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
}

.leaderboard-title h1 {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  font-size: 2.2rem;
  color: #4a4a4a;
}

.leaderboard-title img {
  display: block;
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 12px;
}

.rules-leaderboard h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #4a4a4a;
}

.rules-leaderboard {
  margin: 40px;
  margin-top: 50px; 
}

.leaderboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding: 16px 8px 6px;
}

.leaderboard-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(255, 145, 169, 0.22);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.leaderboard-card h3 {
  text-align: center;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.leaderboard-item {
  display: grid;
  grid-template-columns: 28px 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7fa;
  border: 1px solid rgba(255, 145, 169, 0.18);
}

.leaderboard-rank {
  font-weight: 700;
  color: #5a4b52;
  width: 28px;
  text-align: center;
  font-size: 14px;
}

.leaderboard-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 145, 169, 0.4);
  justify-self: center;
}

.leaderboard-name {
  font-weight: 600;
  color: #4a4a4a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.leaderboard-score {
  font-weight: 700;
  color: #ff5c8a;
  font-size: 13px;
  text-align: right;
  min-width: 72px;
}

.rules-list,
.rules-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #5e565a;
  font-size: 14px;
}

.rules-list li,
.rules-steps li {
  line-height: 1.6;
}

.rules-note {
  font-size: 13px;
  color: #7a6b72;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff3f7;
  border: 1px dashed rgba(255, 145, 169, 0.5);
  width: fit-content;
}

.rules-creator img {
  border-radius: 20px;
}


.create-egg-form > div {
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.3px;
}

.create-egg-form input[type="text"],
.create-egg-form input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid #ffd1dc;
  background: #fff;
  outline: none;
  font-size: 14px;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: background-color 0.2s ease, border-color 0.2s ease, border-width 0.2s ease, padding 0.2s ease, box-shadow 0.2s ease, font-size 0.2s ease;
}

.create-egg-form input[type="range"] {
  width: 100%;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.create-egg-form input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: #ffd1dc;
  border-radius: 999px;
}

.create-egg-form input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border-radius: 50%;
  background: #ff69b4;
  border: 2px solid #ff91a9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.create-egg-form input[type="range"]::-moz-range-track {
  height: 8px;
  background: #ffd1dc;
  border-radius: 999px;
}

.create-egg-form input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff69b4;
  border: 2px solid #ff91a9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.file-input {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 2px dashed #ffd1dc;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.file-input span {
  padding: 8px 12px;
  border-radius: 8px;
  background: #ff91a9;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

.file-input p {
  font-size: 12px;
  color: #777;
}

.file-input:hover {
  border-color: #ff91a9;
  box-shadow: 0 4px 10px rgba(255, 145, 169, 0.2);
}

.file-input.dragover {
  background: #ffe4ec;
  border-color: #ff69b4;
}

.file-status {
  font-size: 12px;
  color: #666;
  text-align: center;
}

.file-input input[type="file"] {
  display: none;
}

.create-egg-form input[type="text"]:focus,
.create-egg-form input[type="number"]:focus {
  background-color: var(--pink-dark);
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
  border: 4px solid #ff91a9;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.create-egg-form input[type="submit"] {
    cursor: pointer;
    background-color: var(--pink-dark);
    border-radius: 8px;
    padding: 0;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
    border: 5px solid #ff91a9;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: all 0.2s ease;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.create-egg-form input[type="submit"]:hover {
  box-shadow: 0 0px 12px rgba(255, 105, 180, 0.4);
}

.create-egg-form input[type="submit"]:active {
  background-color: var(--accent);
  border: 5px solid #84844d;
  box-shadow: 0 0px 12px var(--accent);
}

.toast {
  position: fixed;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #d8f5d3;
  color: #2b6b2b;
  font-weight: 600;
  max-width: min(90vw, 520px);
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  z-index: 10000;
  transition: top 0.35s ease;
  font-size: 16px;
}

.toast span {
  white-space: normal;
  line-height: 1.4;
}

.toast.is-visible {
  top: 20px;
}

.toast-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.toast-failure {
  background: #f8d7da;
  color: #721c24;
}

@media (max-width: 900px) {
  .create-egg-layout {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 720px) {
  .create-egg-preview {
    min-height: auto;
  }

  .create-egg-canvas {
    min-height: 320px;
    height: min(60vh, 420px);

  }

  .create-egg-layout {
    width: 94vw;
  }

  .create-egg-form {
    min-height: auto;
  }

  .rules-container{
    grid-template-columns: minmax(280px, 1fr);
  }

  .rules-leaderboard h1 {
    font-size: 1rem;
  }
  .options {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 40px;
  }

  .options > div:nth-child(4) {
    order: 4;
  }

  .options > #authArea {
    order: 5;
  }
}

/* options stuff */

#authArea {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  position: relative;
  z-index: 1000;
}

#authArea::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px; /* covers the gap */
}

#authArea {
  visibility: hidden;
}
#authArea.ready {
  visibility: visible;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 10px 18px;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #ff91a9;
  object-fit: cover;
}

.user-names {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.user-global {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.user-username {
  font-size: 13px;
  opacity: 0.6;
  font-weight: 500;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: white;
  border: 2px solid #ff91a9;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}

#authArea:hover .user-dropdown {
  opacity: 1;
  pointer-events: all;
  z-index: 1001;
}

.user-dropdown a,
.user-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, padding-left 0.15s ease;
  text-decoration: none;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--pink-light);
}

.user-dropdown-divider {
  height: 1px;
  background: #ffd1dc;
  margin: 4px 0;
}


.logout-btn {
  display: flex;
  align-items: center;
  color: #e00550 !important;
}

#qrcode {
  display: block;
  margin: 0 auto;
  position: relative;
  margin-top: 80px;
  margin-bottom: 80px;
}

.qr-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.qr-link > .overlay-btn {
  font-size: 12px;
  min-width: 50px;
  max-width: 180px;
}

@media (max-width: 665px) {
  .create-egg-canvas {
    min-height: 240px;
    height: min(52vh, 340px);
  }
}