/* ————————— Reset & Base ————————— */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body {
  height: 100%;
  overflow: hidden;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d1d1d1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  padding: 20px;
}

/* ————— Card Container (all pages) ————— */
.card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  height: 90vh;
  background: #f0fbff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* ————— Watermark (all pages) ————— */
.card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  background: url('images/watermark.png') no-repeat center;
  background-size: contain;
  opacity: 0.20;
  pointer-events: none;
  z-index: 0;
}

/* ————— Scrollable Content + Pinned Button ————— */
.card-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.content-inner {
  flex: 1;
  overflow-y: auto;
  padding: 64px 96px;
  z-index: 1;
}
.card-content button {
  margin: 0 auto 24px;
  padding: 12px 24px;
  font-size: 1rem;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* ————— General Paragraphs ————— */
.content-inner p {
  margin-bottom: 1em;
  font-size: 1rem;
  color: #222;
  text-align: justify;
}
.content-inner .intro {
  margin-bottom: 32px;
}

/* ————— Page-2 Headline ————— */
.content-inner h2 {
  margin-bottom: 24px;
  font-size: 1.125rem;
  color: #111;
}

/* ————— Demographic Form ————— */
.content-inner form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #222;
}
.content-inner form input[type="text"],
.content-inner form input[type="number"] {
  display: block;
  width: 100%;
  margin-bottom: 24px;
  padding: 12px 16px;
  font-size: 1rem;
  color: #222;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  appearance: textfield;
  background-image: none;
}
.content-inner form select {
  display: block;
  width: 100%;
  margin-bottom: 24px;
  padding: 12px 16px;
  font-size: 1rem;
  color: #222;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
}

/* ————— ASRS Rating Scale ————— */
.rating-group {
  margin-bottom: 32px;
}
.rating-group p {
  margin-bottom: 8px;
  font-weight: normal;
  color: #222;
}
.rating-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.scale-label {
  flex-shrink: 0;
  width: 60px;
  text-align: center;
  font-size: 0.875rem;
  color: #666;
}
.rating-options {
  display: flex;
  gap: 12px;
}
.rating-options input[type="radio"] {
  display: none;
}
.rating-options label {
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  color: #222;
}
.rating-options input[type="radio"]:checked + label {
  background: #222;
  color: #fff;
  border-color: #222;
}

/* ————— SAS-SV page only: tighter Likert & uppercase placeholders ————— */
#sasForm .rating-row,
#sasForm .rating-options {
  gap: 4px;
}
#sasForm .scale-label {
  width: 80px;
  font-size: 0.65rem;
  text-transform: uppercase;
}

/* ————— GIF Container ————— */
.gif-container {
  margin: 24px 0;
  text-align: center;
}
.gif-container img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  border: 1px solid #ccc;
  background: #fff;
  padding: 8px;
}

/* ————— Desktop vs Mobile Swap ————— */
.desktop {
  display: inline-block;
  font-weight: 700;
}
.mobile {
  display: none;
  font-weight: 700;
}
@media (max-width: 1024px) {
  .desktop { display: none !important; }
  .mobile  { display: inline-block !important; }
}

/* ————— Responsive – Mobile Overrides ————— */
@media (max-width: 480px) {
  /* Allow whole page to scroll */
  html, body {
    height: auto;
    overflow: auto;
  }
  /* Let body remain flex to center card */
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  /* Card: fixed 90vh like desktop, centered */
  .card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 100%;
    height: 90vh;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
  }
  /* Content layout same as desktop */
  .card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  .content-inner {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
  }
  .content-inner p { font-size: 0.925rem; }
  .content-inner h2 { font-size: 1.05rem; }
  .card-content button {
    display: block;
    width: auto;
    margin: 0 auto 24px;
    padding: 12px 24px;
  }

  /* Break “Velmi casto” on ASRS page */
  #asrsForm .scale-label {
    white-space: normal;
    max-width: 5ch;
  }
  /* Center ASRS Likert scale */
  #asrsForm .rating-row,
  #asrsForm .rating-options {
    justify-content: center;
  }

  /* Inline placeholders + scales */
  .rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
  .scale-label {
    flex: 0 0 auto;
    width: auto;
    margin: 0 8px;
    text-align: center;
    font-size: 0.875rem;
  }
  .rating-options {
    display: flex;
    gap: 4px;
  }
  .rating-options label {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 0.875rem;
  }

  /* SAS-SV center and scale */
  #sasForm .rating-row {
    justify-content: center;
    transform: scale(0.95);
    transform-origin: center;
  }
  #sasForm .rating-options {
    justify-content: center;
  }
  #sasForm .scale-label {
    width: 70px;
    font-size: 0.6rem;
  }
  
  /* Internet Addiction Test center and scale */
  #internetForm .rating-row {
    justify-content: center;
    transform: scale(0.95);
    transform-origin: center;
  }
  #internetForm .rating-options {
    justify-content: center;
  }
  #internetForm .scale-label {
    width: 70px;
    font-size: 0.6rem;
  }
  
  /* B-SMAS center and scale */
  #socialMediaForm .rating-row {
    justify-content: center;
    transform: scale(0.95);
    transform-origin: center;
  }
  #socialMediaForm .rating-options {
    justify-content: center;
  }
  #socialMediaForm .scale-label {
    width: 70px;
    font-size: 0.6rem;
  }
}

/* ————— Responsive – Mid-range Overrides ————— */
@media (min-width: 768px) and (max-width: 1024px) {
  .content-inner {
    padding: 56px 64px;
  }
  .content-inner p {
    font-size: 1.05rem;
  }
  .content-inner h2 {
    font-size: 1.15rem;
  }
}

/* ————— Go/No-go Trial Page Styles ————— */
body.gng-trial-page .gng-intro {
  font-size: 1.0625rem;
  text-align: justify;
  margin-bottom: 110px;
}
body.gng-trial-page .gng-center {
  text-align: center !important;
  font-size: 1.0625rem;
  line-height: 1.4;
}
body.gng-trial-page .gng-center-small {
  margin-bottom: 70px;
}
body.gng-trial-page .gng-center-large {
  margin-bottom: 110px;
}
body.gng-trial-page .gng-justified {
  text-align: justify;
  font-size: 1.0625rem;
  margin-bottom: 20px;
}
