/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Fredoka', sans-serif;
}

/* DESKTOP (default) */
body {
  position: relative;
  background: none !important;
  display: flex;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('background-desktop.webp') no-repeat center center;
  background-size: cover;
  z-index: -1;
}

/* MOBILE (portrait screens) */
@media (max-aspect-ratio: 1/1) {
  body::before {
    background-image: url('background-mobile.png');
    background-size: cover;
    /* or contain / auto 100% depending on your preference */
  }
}


.fab {
  color: black;
}

.btn {
  font-size: 28px;
  cursor: pointer;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  height: 70px;
  border: 0.5px solid #e9e9e9;
  color: black;
}

/* HEADER */
.header {
  padding: 2rem 0 0;
  text-align: center;
  z-index: 2;
}

.logo {
  margin-top: 10px;
  width: 30%;
  height: auto;
}

/* MAIN CONTENT */
.main-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  z-index: 2;
  margin-left: auto;
  margin-right: auto;
}

#username {
  display: block;
  margin: 10px auto;
  padding: 10px;
  width: 80%;
  max-width: 300px;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
}


.username-input {
  width: 240px;
  padding: 0.6rem 1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.username-input:focus {
  border-color: #b00a0a;
  outline: none;
}

#generate {
  padding: 12px 28px;
  border-radius: 14px;
  border: none;

  background: linear-gradient(
    180deg,
    #4fc3ff,
    #1b6fff
  );

  color: white;
  font-size: 16px;
  font-weight: 900;

  cursor: pointer;

  box-shadow:
    0 6px 0 #1556b8,
    0 10px 20px rgba(0,0,0,0.25);

  transition: transform 0.08s ease, box-shadow 0.08s ease;

  margin-bottom: 2rem;
}

#generate:active {
  transform: translateY(3px);
  box-shadow:
    0 3px 0 #1556b8,
    0 6px 12px rgba(0,0,0,0.25);
}

.fix-stroke {
  paint-order: stroke fill;
}

#generate:active {
    border-bottom-width: 2px; /* Reduce border width on hover and active states */
    border-bottom-color: #0054a8; /* Change border color on hover and active states */
}
/* Optional: make sure elements are above background */
header,
main {
  position: relative;
  z-index: 2;
}

.item-image {
  height: 160px;
  border-radius: 14px;
  overflow: hidden;

  background: linear-gradient(
    180deg,
    #6fd3ff,
    #2a7cff
  );

  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.25),
    0 6px 14px rgba(0,0,0,0.25);

  margin-bottom: 12px;
  position: relative;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.item-image {
  position: relative;
}

/* Stats overlay */
.stats {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;

  display: flex;
  justify-content: space-between;

  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);

  border-radius: 10px;
  padding: 6px 8px;

  font-size: 11px;
  font-weight: 800;
}

.rarity {
  position: absolute;
  top: 10px;
  left: 10px;

  padding: 4px 9px;
  border-radius: 8px;

  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.6px;

  text-transform: uppercase;
  color: #2a1200;

  box-shadow:
    0 2px 6px rgba(0,0,0,0.35);
}

/* SECRET – Element / Fire themed */
.rarity.secret {
  background: linear-gradient(
    180deg,
    #7ff6e6,
    #2fdac6,
    #18b6a5
  );

  color: #003a35;

  box-shadow:
    0 0 10px rgba(80, 255, 230, 0.6),
    0 2px 6px rgba(0,0,0,0.4),
    inset 0 0 0 1px rgba(255,255,255,0.45);

  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 900;
}

.rarity.mythic {
  background: linear-gradient(
    180deg,
    #ff6a6a,
    #e33b3b,
    #b81818
  );

  color: #3b0000;

  box-shadow:
    0 0 8px rgba(255, 90, 90, 0.45),
    0 2px 6px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.35);

  text-shadow:
    0 1px 0 rgba(255,255,255,0.35);
}

.rarity.legendary {
  background: linear-gradient(
    180deg,
    #ffcc7a,
    #ff9f1a,
    #e87400
  );

  color: #4a2400;

  box-shadow:
    0 0 8px rgba(255, 170, 60, 0.45),
    0 2px 6px rgba(0,0,0,0.4),
    inset 0 0 0 1px rgba(255,255,255,0.4);

  text-shadow:
    0 1px 0 rgba(255,255,255,0.35);
}

.stats b {
  color: #ffd966; /* gold pop */
}


/* Flex row for cards */
.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

.card {
  width: 280px;
  padding: 14px;
  border-radius: 18px;

  /* Tropical glass card */
  background: linear-gradient(
    180deg,
    rgba(0, 170, 255, 0.35),
    rgba(0, 90, 180, 0.55)
  );

  backdrop-filter: blur(6px);

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.25),
    inset 0 0 0 2px rgba(255, 255, 255, 0.18);

  color: white;
}

.card[data-rarity="secret"] {
  box-shadow:
    0 0 25px rgba(255, 200, 80, 0.6),
    inset 0 0 0 2px rgba(255, 200, 80, 0.5);
}

.last {
  margin-bottom: 90px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.card-header h3 {
  font-size: 18px;
  font-weight: 900;
  margin: 0;
}


/* Image wrapper */
.card img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  padding: 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
}

/* Tag */
.tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
}

.tag.rod {
  color: #eaffff;
}

.tag.weapon {
  background: #c62828;
}

.tag.diamonds {
  background: #7e57c2;
}

.tag.class {
  background: #D6A73B;
}

/* Title + description */
.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 20px;
  color: white;
  margin: auto 0px;
}

.card p {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.9;
  margin: 6px 0 12px;
}

/* Button */
.select-btn {
  width: 100%;
  padding: 11px 0;

  border-radius: 12px;
  border: none;

  background: linear-gradient(#ff4d4d, #d62828);
  color: white;

  font-weight: 900;
  cursor: pointer;

  box-shadow:
    0 4px 0 #a81d1d,
    0 6px 14px rgba(0,0,0,0.3);

  transition: transform 0.08s ease;
}

.card.selected {
  outline: 3px solid rgba(80, 255, 160, 0.75);
  outline-offset: -3px;
}

.section-divider {
  width: 100%;
  margin: 26px 0 14px;

  display: flex;
  align-items: center;
  gap: 14px;

  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;

  color: rgba(255,255,255,0.85);
}

/* Lines either side */
.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 2px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.35),
    transparent
  );
}

/* Label */
.section-divider span {
  padding: 6px 14px;
  border-radius: 999px;

  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.25);
}



.select-btn.selected {
  background: linear-gradient(
    180deg,
    #6dff9c,
    #1ecb63
  );

  color: #0f3a1f;

  box-shadow:
    0 4px 0 #139b4a,
    0 6px 14px rgba(0,0,0,0.3);

  cursor: default;
}

.select-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #a81d1d;
}

/* Mobile Fix */
@media (max-width: 480px) {
  .card {
    width: 80%;
  }

  .logo {
    width: 60%;
  }
}

.cards-scroll {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  padding: 0 10px;
  margin: 0 auto;
  max-width: 1000px;
}


.cards-scroll::-webkit-scrollbar {
  width: 6px;
}

.cards-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
}

#warning-cards {
  margin-top: 20px;
}

#warning-username {
  margin-bottom: 20px;
}
.warning {
  width: 80%;
  margin: 8px auto 0;

  padding: 10px 12px;
  border-radius: 8px;

  background: rgba(120, 35, 35, 0.95);
  border: 1px solid rgba(255, 110, 110, 0.65);

  color: #ffd6d6;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-align: center;

  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.55);

  opacity: 0;
  transform: translateY(-4px);

  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

/* Visible */
.warning[style*="display: block"] {
  opacity: 1;
  transform: translateY(0);
}

.input-error {
  animation: input-shake 0.25s ease;
  border-color: rgba(255, 110, 110, 0.8);
}

@keyframes input-shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}


/* Fade-in animation */
@keyframes warningFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Fade-out animation */
@keyframes warningFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.95);
  }
}



.hidden {
  display: none !important;
}

.loading-wrapper {
  width: 80%;
  max-width: 400px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  margin: 20px auto;
  border-radius: 10px;
  overflow: hidden;
}

#loading-bar {
  height: 100%;
  width: 0%;
  background: #ff3b3b;
  transition: width 0.2s linear;
}

.pulse {
  animation: pulse 1s infinite;
}

#sequence-container {
  background: rgba(8, 20, 26, 0.9);
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 20px;
  text-align: center;
  margin: auto;
  max-width: 400px;
  width: 90%;
  height: auto;
  z-index: 1000;
  overflow: hidden;
  align-items: center;
}

.h1 {
  font-size: 16px;
  margin: 10px 0;
  margin-bottom: 40px;
}

#username-placeholder {
  font-size: 1.25rem;
  margin: 10px 0;
  margin-bottom: 40px;
}


.step10before img {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  margin-top: 35px;
}

.fa-brands,
.fab {
  font-weight: 400;
}



.wide {
  grid-column: span 2;
  height: 40px;
  font-size: 20px;
}

.continue-button {
  width: 80%;
  background: #d62828;
  padding: 12px;
  border-radius: 10px;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 15px;
  transition: 0.2s;
  margin-top: 20px;
}





.step10before p {
  font-size: 1.25rem;
  margin: 10px 0;
  margin-bottom: 40px;
}


@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes slide-in {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes slide-out {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(100%);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0.5);
    /* Start smaller but centered */
    opacity: 0;
  }

  60% {
    transform: scale(1.1);
    /* Slightly larger */
    opacity: 1;
  }

  100% {
    transform: scale(1);
    /* Fully centered and normal size */
  }
}

@keyframes bounceOut {
  0% {
    transform: scale(1);
    /* Start at normal size */
    opacity: 1;
    /* Fully visible */
  }

  50% {
    transform: scale(0.9);
    /* Slight shrink */
    opacity: 0.5;
    /* Begin fading out */
  }

  100% {
    transform: scale(0);
    /* Completely shrink */
    opacity: 0;
    /* Fully invisible */
  }
}

.bounce-out {
  animation: bounceOut 0.6s ease forwards;
}

.bounce-in {
  animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn2 {
  0% {
    transform: scale(0.5);
    /* Start smaller but centered */
    opacity: 0;
  }

  60% {
    transform: scale(1.1);
    /* Slightly larger */
    opacity: 1;
  }

  100% {
    transform: scale(1);
    /* Fully centered and normal size */
  }
}



.bounce-in2 {
  animation: bounceIn2 0.8s ease-out;
}

.rotating-cog {
  animation: spin 3s linear infinite;
}

#loading-bar-container {
  width: 80%;
  height: 10px;
  background: white;
  /* soft light red/pink instead of gray */
  border-radius: 5px;
  overflow: hidden;
  margin: 0 auto 20px auto;

}

#loading-bar {
  width: 0%;
  height: 100%;
  background: #d62828;
  /* flat red gradient */
  transition: width 3s linear;
}


.step-image2 {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  margin-top: 15px;
}





#popup-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 70%;
  
}

.popup-card {
  display: none;
  position: relative;

  padding: 14px 18px;
  margin-bottom: 14px;
  max-width: 100%;

  border-radius: 14px;

  background: linear-gradient(
    180deg,
    rgba(0, 210, 230, 0.25),
    rgba(0, 120, 150, 0.35)
  );

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid rgba(255,255,255,0.18);

  box-shadow:
    0 8px 20px rgba(0,0,0,0.35),
    inset 0 0 0 1px rgba(255,255,255,0.08);

  color: white;
  font-family: "Fredoka", sans-serif;

  opacity: 1;
  transform: translateY(6px) scale(0.98);

  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(.2,.8,.2,1);
}

.popup-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.12),
    0 0 18px rgba(0, 220, 255, 0.18);
}


.popup-card img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}

.popup-card-content {
  display: flex;
  align-items: center;
}

.popup-card-content div {
  margin-left: 10px;
}

.popup-card h4 {
  margin: 0;
  font-size: 16px;
}

.popup-card p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.popup-text {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.5em;
}


#sequence-container {
  background: radial-gradient(circle at top, rgba(0,255,220,0.08), rgba(0,0,0,0.85));
  backdrop-filter: blur(6px);
  
  padding: 20px;
  text-align: center;
  margin: auto;
  max-width: 400px;

  width: 90%;
  height: auto;

  z-index: 1000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}



.step {
  width: 88%;
  max-width: 420px;

  padding: 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;

  text-align: center;
  animation: stepIn 0.35s ease forwards;
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.step img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  margin-bottom: 4px;

  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.6));
}

.step p {
  color: rgba(255,255,255,0.95);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

#step-10-text {
  color: rgba(255,255,255,0.95);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
}

.step span {
  color: #7ff6e6;
  font-weight: 900;
}

.rotating-cog {
  animation: spin 1.4s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.verify-button {
  margin-top: 12px;
  width: 85%;
  padding: 16px 0;

  border-radius: 999px;
  border: none;

  background: linear-gradient(180deg, #ff5252, #e02020);
  color: white;

  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;

  cursor: pointer;

  box-shadow:
    0 0 0 rgba(255,80,80,0.6),
    0 10px 30px rgba(255,0,0,0.4),
    inset 0 -4px 0 rgba(0,0,0,0.25);

  animation: verifyPulse 1.6s infinite ease-in-out;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

@keyframes verifyPulse {
  0% {
    box-shadow:
      0 0 0 rgba(255,80,80,0.4),
      0 10px 30px rgba(255,0,0,0.3);
  }
  50% {
    box-shadow:
      0 0 28px rgba(255,80,80,0.8),
      0 18px 50px rgba(255,0,0,0.5);
  }
  100% {
    box-shadow:
      0 0 0 rgba(255,80,80,0.4),
      0 10px 30px rgba(255,0,0,0.3);
  }
}


#step-3-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  width: 100%;
}

#step-3 .wide {
  grid-column: span 2;
}

#step-3 .btn {
  height: 56px;
  border-radius: 14px;
  border: none;

  background: linear-gradient(180deg, #ffffff, #e9e9e9);
  color: #111;

  font-size: 22px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 4px 0 #cfcfcf,
    0 6px 14px rgba(0,0,0,0.25);

  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    background 0.15s ease;
}

#step-3 .btn.selected {
  background: linear-gradient(180deg, #2cff98, #18c76a);
  color: #083a1e;

  box-shadow:
    0 4px 0 #0fa456,
    0 0 10px rgba(40, 255, 150, 0.45),
    0 6px 14px rgba(0,0,0,0.3);

  transform: translateY(2px);
}

#step-3 .btn:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 rgba(0,0,0,0.25),
    0 3px 8px rgba(0,0,0,0.25);
}


#step-3 h3 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;

  color: white;
  text-align: center;
  margin-bottom: 10px;

  white-space: nowrap; /* 👈 prevents wrapping */
  text-shadow:
    0 2px 6px rgba(0,0,0,0.5);
}


#step-3 h3::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  margin: 10px auto 0;

  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.9),
    transparent
  );

  opacity: 0.8;
}



.continue-button {
  width: 100%;
  padding: 11px 0;

  border-radius: 12px;
  border: none;

  background: linear-gradient(#ff4d4d, #d62828);
  color: white;

  font-weight: 900;
  cursor: pointer;

  box-shadow:
    0 4px 0 #a81d1d,
    0 6px 14px rgba(0,0,0,0.3);

  transition: transform 0.08s ease;
}

.continue-button:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #a81d1d;
}

.verify-hint {
  margin-top: 10px;

  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;

  color: rgba(255,255,255,0.85);
  text-align: center;
}