html,
body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background-color: #f9fafb;
}

/* === Shared Layout === */
.psych-test-app {
  font-family: 'Inter', sans-serif;
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  padding-top: 4rem;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  color: #333;
  position: relative;
  overflow: hidden;
}

/* === Landing Page Titles and List === */
.psych-test-app h1,
.psych-test-app h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.psych-test-app p {
  font-size: 1rem;
  margin-bottom: 2rem;
}

.psych-test-app ol {
  list-style: none;
  padding: 0;
  margin: 0 auto;
}

.psych-test-app ol li {
  background: #f7f7f7;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  transition: background 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.psych-test-app ol li:hover {
  background: #e8f0ff;
}

.psych-test-app ol li a {
  display: block;
  padding: 1rem;
  text-decoration: none;
  color: #059669;
  font-weight: 500;
}

.psych-test-app ol li a:hover {
  text-decoration: underline;
}

/* === Language Switcher === */
.language-switcher {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  padding: 0.75rem 1.5rem;
  margin: -2rem -2rem 1.5rem -2rem;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.15);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.language-switcher form {
  margin: 0;
}

.language-switcher .lang-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 2rem;
  margin-right: 2rem;
}

.language-switcher .lang-label:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.language-switcher .lang-icon {
  font-size: 1.2rem;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.language-switcher .lang-select {
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  font-size: 0.95rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: #059669;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1.5L6 6.5L11 1.5" stroke="%23059669" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.language-switcher .lang-select:hover {
  background-color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.language-switcher .lang-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* === ACE Test Form Styling === */
.question-block {
  margin-bottom: 2rem;
}

.question-block p {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

/* Card-style option buttons */
.psych-test-app .label-button {
  display: inline-block;
  margin: 0.5rem 0.5rem 0.5rem 0;
  padding: 0.5rem 2rem;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  background-color: #f9f9f9;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  color: #374151;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.psych-test-app .label-button:hover {
  background-color: #f7f7f7;
  border-color: #059669;
  color: #059669;
}

.psych-test-app input[type="radio"] {
  display: none;
}

.psych-test-app .label-button:has(input[type="radio"]:checked) {
  background-color: #059669;
  color: white;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3);
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* Primary buttons (Submit, Back) */
.psych-test-app .button {
  display: inline-block;
  margin: 1rem 0.5rem 0 0;
  padding: 0.75rem 1.5rem;
  background-color: #059669;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.psych-test-app .button:hover {
  background-color: #34d399;
}

.warning-banner {
  display: none;
  background-color: #fef3c7;
  color: #92400e;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid #fcd34d;
}

/* Result Box */
.result-box {
  background-color: #e5e7eb;
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  text-align: center;
}

.result-box p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 500;
}


.user-info {
  display: flex;
  gap: 16px;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem 0 1.5rem;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  flex-wrap: wrap;
}

.user-info .field-group {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
  align-items: center;
}

.user-info label {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #374151;
}

.user-info input {
  font-size: 0.95rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #fff;
  transition: border-color 0.2s;
}

/* Container reset */
.test-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Spacing between items */
.test-item {
  margin-bottom: 0.5em;
  background: #f7f7f7;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  transition: background 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* Make the whole row clickable */
.test-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0.6em 1em;
  border-radius: 4px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Highlight on hover */
.test-option:hover {
  background: #e8f0ff;
}

/* Style the checkbox itself */
.test-checkbox {
  margin-right: 0.75em;
  width: 1.1em;
  height: 1.1em;
  accent-color: #059669; /* only on browsers that support it */
}

/* (Optional) style the text, e.g. prevent wrapping) */
.test-option-text {
  line-height: 1.4;
  color: #059669;
}


/* === Responsive Design === */
@media (max-width: 600px) {
  .psych-test-app {
    padding: 1.5rem;
  }

  .psych-test-app h1 {
    font-size: 1.5rem;
  }

  .psych-test-app label {
    display: block;
    margin-bottom: 1rem;
  }
  .option-row {
    flex-direction: column;
  }
  .psych-test-app .button {
    width: 100%;
    margin-bottom: 1rem;
  }

  .language-switcher {
    padding: 0.1rem 0.75rem;
    margin: -1.5rem -1.5rem 0.75rem -1.5rem;
  }
  
  .language-switcher .lang-label {
    padding: 0.3rem 0.5rem;
    gap: 0.3rem;
  }
  
  .language-switcher .lang-icon {
    font-size: 1rem;
  }
  
  .language-switcher .lang-select {
    font-size: 0.85rem;
    padding: 0.3rem 1.5rem 0.3rem 0.5rem;
  }
  
  .psych-test-app {
    padding: 1.5rem;
    padding-top: 3.5rem;
  }
  
  .psych-test-app h1 {
    font-size: 1.4rem;
    margin-top: 0.5rem;
  }
}



/* the spinning circle */
.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ccc;
  border-top-color: #059669;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* keyframes for the rotation */
@keyframes spin {
  to { transform: rotate(360deg); }
}