
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-image: url('images/page_bg.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body {
  background-image: url('images/page_bg.png');
  background-size: 480px;
  background-position: top center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.main {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    color: white; /* Added for visibility against dark background */
    height: 100vh;
    box-sizing: border-box; /* Include padding in height calculation */
    overflow: auto; /* Keep scrolling within the main element */
}


/* When .main has .background-register, apply this background to the body */
body:has(.main.background-register) {
    background-image: url('images/bg_assemble_2.png');
    background-size: 480px;
    background-position: top center;
    background-repeat: no-repeat;
    /* background-attachment: fixed; has been removed */
}
body:has(.main.background-dashboard) {
    background-image: url('images/bg_assemble_2.png');
    background-size: 480px;
    background-position: top center;
    background-repeat: no-repeat;
    /* background-attachment: fixed; has been removed */
}

body:has(.main.background-badge) {
  background-image: url('images/bg_assemble_2.png');
  background-size: 480px;
  background-position: top center;
  background-repeat: no-repeat;
  /* background-attachment: fixed; has been removed */
}

body:has(.main.background-learn-more) {
  background-image: url('images/bg_shape_2.png');
  background-size: 480px;
  background-position: top center;
  background-repeat: no-repeat;
  /* background-attachment: fixed; has been removed */
}

.background-register {
    /* Make the main element transparent to show the new body background */
    background: none;
}

.logo {
    max-width: 100px;
    height: auto;
    display: block;
    margin: 0 auto 24px;
}

.logo-section {
    text-align: center;
    padding: 20px 0;
}

.flex-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

.hero-section {
  /* flex-grow has been removed */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* Stack children vertically */
}

.footer-section {
  text-align: center;
  margin-top: auto; /* Push footer to the bottom */
}

/* --- Preloader --- */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1c1c1e; /* Match dark background */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

#preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.register-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background-color: #f20402;
    width: 100%;
}

.hero-image-400 {
    max-width: 400px;
    height: auto;
    padding: 24px;
}

@media (max-width: 379px) {
  .hero-image-400 {
      max-width: 320px !important;
  }
  .hero-image-350 {
    max-width: 320px !important;
}
.badge-row img {
  height: auto !important;
}

.badge-link {
  min-width: 50px !important;
}

.badge-name {
  font-size: 8px !important;
}

.badge-link-game-grey {
  max-width: 30px !important;
}
h1{
  font-size: 24px !important;
}
.badge-checkmark {
  width: 20px !important;
  right: 1px !important;
}
}


.hero-image-300 {
    max-width: 300px;
    height: auto;
    padding: 24px;
}

.hero-image-350 {
  max-width: 350px;
  height: auto;
  padding: 24px;
}

.icon-image-100 {
  max-width: 100px;
  height: auto;
}

.badge-link-game-grey {
    max-width: 40px;
    height: auto;
}

.badge-link-game {
  max-width: 50px;
  height: auto;
}

.answer{
  border: 2px solid white;
  border-radius: 20px;
  margin: 20px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5);
}
.body-section {
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: center;
    justify-content: center;
    color: white;
    width: 100%; /* Ensure it takes full width */
    padding-bottom: 64px;
    text-align: center;
}

.register-form {
    width: 100%;
    max-width: 350px; /* Constrain form width for better readability */
    margin-top: 20px;
}

.register-form .form-group {
    margin-bottom: 15px;
}

.register-form input[type="text"],
.register-form input[type="email"] {
  width: 100%;
  background-color: transparent;
  border: 2px solid white;
  border-radius: 25px; /* Creates the pill shape */
  padding: 12px 20px;
  color: white;
  font-size: 1rem;
  box-sizing: border-box;
}

.register-form input::placeholder {
  color: rgba(255, 255, 255, 0.8); /* Lighter white for placeholder text */
}

.submit-group {
    text-align: center; /* Center the image button */
    margin-top: 20px;
}

.submit-arrow {
    width: 80px; /* Adjust size as needed */
    height: auto;
    margin-bottom: 20px;
}

.body-section h1 {
  position: relative; /* Needed for the underline */
  padding-bottom: 10px; /* Space for the underline */
  font-weight: 400; /* Make the base font normal weight */
}

.body-section h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%; /* (100% - 70%) / 2 */
  width: 70%;
  height: 2px;
  background-color: white;
}

.body-section h1 span {
  font-weight: 900; /* Bolder than the default bold */
}

.dashboard-page .body-section h1 {
  font-weight: 400; /* Make dashboard heading normal weight */
  padding-bottom: 0; /* Remove space for underline */
}

.dashboard-page .body-section h1::after {
  content: none; /* Remove the inherited underline */
}

.dashboard-logo {
    max-width: 300px;
    height: auto;
    display: block;
    margin-top: 24px;
}

.spacer-50 {
    height: 50px;
}

.spacer-30 {
    height: 30px;
}

.badges {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
    width: 100%;
}

.badge-row {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    margin-bottom: 10px;
}

.badge-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
    min-width: 100px;
}

.badge-name {
    margin-top: 8px;
    font-weight: bold;
    font-size: 0.8rem;
}

.badge-row img {
    width: 70px;
    height: auto;
}

#body-section-complete {
    display: none;
}

.hero-image-sticky {
    position: fixed;
    top: 0;
    z-index: 10;
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
}

#selfie-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.selfie-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.selfie-image.visible {
    opacity: 1;
}

.video-list {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.video-item {
    margin-bottom: 20px;
}

.video-item h4 {
    margin-top: 10px;
    margin-bottom: 5px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.video-thumbnail {
    text-align: center;
    color: white;
    text-decoration: none;
}

.video-thumbnail img {
    width: 100%;
    max-width: 120px;
    height: auto;
    border-radius: 10px;
}

.video-thumbnail p {
    margin-top: 10px;
    font-size: 14px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #1c1c1e;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.pagination-button {
    background-color: #f20402;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    position: relative;
}

.pagination-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
}

#prev-page::before {
    border-width: 10px 15px 10px 0;
    border-color: transparent white transparent transparent;
    margin-left: -2px;
}

#next-page::before {
    border-width: 10px 0 10px 15px;
    border-color: transparent transparent transparent white;
    margin-left: 2px;
}
