* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

body {
  background: linear-gradient(to bottom, #0a0e27, #1a1f4e);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  position: relative;
}

/* Background Animation Layer */
#background-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

/* Background Image Wall (Vertical Marquee) */
#bg-image-wall {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: flex;
  justify-content: space-evenly;
  gap: 20px;
  pointer-events: none;
  opacity: 0.15; /* Subtle background */
  overflow: hidden;
  mask-image: linear-gradient(
    to bottom,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.bg-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0; /* Fix flex overflow */
}

.bg-img {
  width: 100%;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  filter: grayscale(30%); /* Slightly desaturated */
}

@keyframes scroll-up {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

@keyframes scroll-down {
  0% {
    transform: translateY(-50%);
  }
  100% {
    transform: translateY(0);
  }
}

/* Main Container */
.container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 400px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.main-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(100, 149, 237, 0.8),
    0 0 20px rgba(100, 149, 237, 0.5);
  letter-spacing: 1px;
}

.subtitle {
  font-size: 1rem;
  color: #a0a0ff;
  margin-bottom: 50px;
  letter-spacing: 1px;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.form-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.input-label {
  font-size: 0.9rem;
  color: #ddd;
  margin-bottom: 5px;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

.input-wrapper {
  width: 100%;
  position: relative;
}

input[type="text"] {
  width: 100%;
  padding: 15px 20px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 20, 40, 0.6);
  color: white;
  font-size: 1rem;
  text-align: center;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

input[type="text"]:focus {
  border-color: #6495ed;
  box-shadow: 0 0 15px rgba(100, 149, 237, 0.4);
  background: rgba(30, 30, 60, 0.8);
}

.submit-btn {
  width: 100%;
  padding: 15px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(90deg, #5c6bc0, #7986cb);
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(92, 107, 192, 0.4);
  margin-top: 10px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(92, 107, 192, 0.6);
  background: linear-gradient(90deg, #6f7bd9, #8c9eff);
}

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

.footer {
  padding-bottom: 20px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- Success Page Styles --- */

.success-container {
  justify-content: space-evenly; /* Better spacing for success page */
}

.icon-row {
  display: flex;
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
  position: relative;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
}

.marquee-track {
  display: flex;
  gap: 15px;
  width: max-content;
  flex-shrink: 0;
}

.game-icon-img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  display: block;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes scroll-right {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

/* Hide scrollbar */
.icon-row::-webkit-scrollbar {
  display: none;
}

.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  flex: 1;
  justify-content: center;
}

.instruction-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
}

.qr-card {
  background: white;
  border-radius: 20px;
  padding: 14px;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  color: #333;
}

.qr-code-wrapper {
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.footer-text {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 10px;
}

/* Responsive adjustments */
@media (max-height: 600px) {
  .main-title {
    font-size: 2rem;
  }
  .subtitle {
    margin-bottom: 30px;
  }
  .game-icon-img {
    width: 40px;
    height: 40px;
  }
  .qr-card {
    padding: 12px;
  }
}
