/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Fredoka', sans-serif;
}

/* BODY + BACKGROUND */
body {
  height: 100vh;
  overflow: hidden;
  /* Prevent scrolling */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: url('background-desktop.webp') no-repeat center center fixed;
  background-size: cover;
  transition: background-image 0.3s ease-in-out;
}

/* Switch background for mobile devices (portrait orientation) */
@media (max-aspect-ratio: 1/1) {
  body {
    background: url('background-mobile.png') no-repeat center center fixed;
    background-size: cover;
  }
}

.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;
}

.step p {
  font-size: 1.25rem;
  margin: 10px 0;
  margin-bottom: 40px;
}

/* HEADER */
.header {
  padding: 2rem 0 1rem;
  text-align: center;
  z-index: 2;
}

.logo {
  margin-top: 50px;
  width: 70%;
  height: auto;
}

/* MAIN CONTENT */
.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
  z-index: 2;
}

#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);
}


.username-input {
  width: 240px;
  padding: 0.6rem 1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.username-input:focus {
  border-color: #b00a0a;
  outline: none;
}

.generate-btn {
  background: linear-gradient(145deg, #ff3300, #b31500);
  /* Fire-inspired gradient */
  color: #fff;
  font-size: 15px;
  padding: 10px 22px;
  font-weight: 400;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 60, 0, 0.6);
  /* Fire glow */
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 20px;
}

.generate-btn:hover {
  background: #b00a0a;
}

/* Optional: make sure elements are above background */
header,
main {
  position: relative;
  z-index: 2;
}

.item-image {
  background: radial-gradient(circle at center,
      rgba(90, 0, 0, 1) 0%,
      /* deep red center */
      rgba(40, 0, 0, 1) 35%,
      /* darker red mid */
      rgba(10, 0, 0, 1) 75%,
      /* almost black */
      rgba(0, 0, 0, 1) 100%
      /* pure black outer */
    );
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.item-image img {
  width: 100%;
  height: 170px;
  object-fit: contain;
}

/* Flex row for cards */
.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

/* Card style */
.card {
  width: 280px;
  background: rgba(8, 20, 26, 0.9);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: 0.25s ease;
  text-align: left;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  margin-top: 20px;
}

.card-header h3 {
  margin: 0;
  font-size: 20px;
  color: white;
}



/* 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 {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 12px;
  color: rgb(223, 240, 255);
  margin: auto 0px;
  font-weight: 600;
}

.tag.tool {
  background: #0277bd;
}

.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 {
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

/* Button */
.select-btn {
  width: 100%;
  background: #d62828;
  padding: 12px;
  border-radius: 10px;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 15px;
  transition: 0.2s;
}

.select-btn:hover {
  background: #ff3b3b;
}

/* Mobile Fix */
@media (max-width: 480px) {
  .card {
    width: 80%;
  }
}

.cards-scroll {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  padding-right: 10px;
  margin-left: 16px;
  height: 500px;
  overflow-y: 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;
}

.select-btn.selected {
  background: #2ecc71 !important;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 255, 0, 0.35);
}

.select-btn.selected:hover {
  background: #27ae60 !important;
}

.warning {
  color: #ff4d4d;
  /* red text */
  background: rgba(0, 0, 0, 0.55);
  /* transparent black background */
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  width: 80%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
  margin-bottom: 10px;
}

/* 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);
  }
}

.warning {
  opacity: 0;
  animation: warningFadeIn 0.25s ease forwards;
}

.hidden {
  display: none !important;
}

.step {
  text-align: center;
  color: white;
  padding: 20px;
}

.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: 1.25rem;
  margin: 10px 0;
  margin-bottom: 40px;
}

#username-placeholder {
  font-size: 1.25rem;
  margin: 10px 0;
  margin-bottom: 40px;
}

.step img {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  margin-top: 35px;
}

.step10before img {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  margin-top: 35px;
}

.fa-brands,
.fab {
  font-weight: 400;
}

#step-3-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  justify-content: center;
  align-items: center;
  max-width: 300px;
  margin: 0 auto;
}

.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;
}

#step-3 h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    margin-top: 0px;
    font-family: 'Fredoka', sans-serif;
}

#step-3-buttons .btn.selected {
    background: #d62828;
    border: 2px solid #d62828;
    color: white;
    transform: scale(1.05);
}

.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: 35px;
}

.step10after p {
      font-size: 1.25rem;
    margin: 10px 0;
    color: white;
}

.step10before p {
      font-size: 1.25rem;
    margin: 10px 0;
    color: white;
}

.verify-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;
}

/* Hover */
.verify-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(201, 31, 58, 0.35);
}

/* Active click */
.verify-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(201, 31, 58, 0.3);
}

/* Disabled state (if you ever need it) */
.verify-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
