/* AUTH CARD (matches game cards feel) */
.auth-card {
  flex: 0 0 auto;
  max-width: 380px;
  width: 100%;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;

  gap: 14px;
  text-align: center;
}

.auth-card h1 {
  margin-bottom: 10px;
  font-size: 28px;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}

.auth-card .control-btn {
  margin-top: 6px;
  padding: 8px 22px;
}

.auth-card .main-btn {
  margin-top: 4px;
  padding: 8px 20px;
}

.auth-card form {
  width: 100%;
  max-width: 340px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* AUTH FOOTER — unified & clean */
.auth-links {
  margin-top: 8px;
  text-align: center;
}

.auth-links > div {
  font-size: 14px;
  color: #4a657a;
  margin: 6px 0;
}

.auth-links a {
  color: var(--primary-dark);
  font-weight: 600;
}

.auth-links a:hover,
.auth-links a:focus-visible {
  color: #b00000;
  text-decoration: underline;
}

.auth-primary {
  font-size: 14px;
  color: #4a657a;
}

.auth-links p {
  margin: 6px 0;
  font-size: 14px;
  color: #4a657a;
}

.auth-layout {
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-panel {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* The actual login box */
.auth-panel .auth-card {
  max-width: 400px;
  width: 100%;

  padding: 22px 26px 18px;

  background: linear-gradient(#f9fcff, #edf3f8);
  border: 1px solid var(--border);
  border-radius: 8px;

  box-shadow:
    inset 0 1px 0 #ffffff,
    0 8px 20px rgba(0,0,0,0.18);

  position: relative;
}

/* top accent bar like your boxes */
.auth-panel .auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: 6px;
  border-radius: 8px 8px 0 0;

  background: linear-gradient(to right, var(--primary), #7fa6c1);
}

.main-btn {
  margin-top: 6px;
  padding: 8px 18px;
}

.form-group {
  width: 100%;
  max-width: 340px;
  text-align: left;
}

.form-group input {
  width: 100%;
  margin: 0 auto; 
  display: block;
  
  padding: 10px 14px;

  border-radius: 12px;
  border: 1px solid var(--border);

  background: #fff;

  font-size: 15px;
}

.form-group input:focus {
  outline: none;
  border-color: #5f86a3;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  margin: 0 0 8px;
  padding: 0 2px;
  color: var(--primary-dark);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  text-align: left;
}

.birthday-group {
  width: 100%;
  max-width: 340px;
  text-align: left;
}

.birthday-label {
  width: fit-content;
}

.birthday-selects {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.birthday-selects select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: #4b5d6b;
  font: inherit;
  font-size: 15px;
}

.birthday-selects select:focus {
  outline: none;
  border-color: #5f86a3;
}

.auth-layout {
  min-height: 420px; /* gives breathing room */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* Special styling for auth pages ONLY */
.auth-page .box {
  background: linear-gradient(#f4f8fc, #e7eff6); /* softer than default */
  
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 2px 6px rgba(0,0,0,0.08); /* MUCH lighter */

  border-radius: 6px;
}

.auth-page .box-inner {
  padding: 25px 20px; /* was 20px 30px */
  justify-content: center;
}

.auth-page.page-wrapper {
  background: #e9eff5; /* slightly flatter */
}

/* CHECKBOX GROUP — tighter + anchored */
.checkbox-group {
  width: 100%;
  text-align: left;
  margin: 4px 0 0;

  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* individual rows */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 7px;

  font-size: 15px;
  line-height: 1.2;
  color: var(--primary-dark);
  font-weight: 500;

  padding: 0 2px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

/* slightly emphasize TOS row */
.tos-row {
  margin-bottom: 0;
}

/* checkbox sizing */
.checkbox-row input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: #4f7897;
}

.age-row {
  position: relative;
}

.age-info-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.age-info-button {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  padding: 0;
  appearance: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--border);
  border-radius: 50%;
  background: linear-gradient(#f9fcff, #edf3f8);
  color: var(--primary-dark);
  box-shadow: inset 0 1px 0 #ffffff;

  font: inherit;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  cursor: help;
}

.age-info-button:hover,
.age-info-button:focus-visible {
  border-color: #5f86a3;
  color: var(--primary-dark);
  outline: none;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 0 0 2px rgba(95, 134, 163, 0.18);
}

.age-notice {
  box-sizing: border-box;
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: calc(100% + 8px);
  width: min(310px, calc(100vw - 40px));
  margin: 0;
  padding: 9px 10px;

  border: 1px solid var(--border);
  border-radius: 6px;
  background: linear-gradient(#fbfdff, #eef4fa);
  box-shadow: 0 6px 16px rgba(42, 68, 89, 0.2);

  color: #385d78;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;

  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.age-notice::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #eef4fa;
  transform: translateX(-50%) rotate(45deg);
}

.age-info-wrap:hover .age-notice,
.age-info-button:focus + .age-notice,
.age-info-button:focus-visible + .age-notice {
  opacity: 1;
  transform: translate(-50%, 0);
}

.age-notice strong {
  color: var(--primary-dark);
}

@media (max-width: 520px) {
  .age-notice {
    width: min(230px, calc(100vw - 40px));
  }

  .birthday-selects {
    grid-template-columns: 1fr;
  }
}

/* TOS link */
.checkbox-row a {
  color: var(--primary-dark);
  font-weight: 600;
}

.checkbox-row a:hover,
.checkbox-row a:focus-visible {
  color: #b00000;
  text-decoration: underline;
}

.captcha-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;

  margin-top: 4px;
}

.auth-message {
  max-width: 340px;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #2f5e3b;
}

.auth-message-error {
  color: #9f1f1f;
}

.auth-message a {
  color: var(--primary-dark);
  font-weight: 600;
}

.verify-card {
  gap: 16px;
  max-width: 400px !important;
  padding: 36px 26px 30px !important;
}

.verify-page.verify-loading .verify-card {
  padding: 30px 26px 24px !important;
}

.verify-page .auth-wrapper {
  max-width: 425px;
}

.verify-card h1 {
  margin-bottom: 2px;
}

.verify-loading-state {
  width: 100%;
}

.verify-loading-message {
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  box-sizing: border-box;
}

.verify-message {
  max-width: 380px;
  margin: 0;
  color: #385d78;
  font-size: 17px;
  line-height: 1.55;
}

.verify-resend-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 4px;
}

.verify-resend-section[hidden] {
  display: none;
}

.verify-link-actions {
  gap: 12px;
  margin-top: 4px;
}

.verify-link-actions:empty {
  display: none;
}

.auth-actions {
  margin-top: 4px;
  display: flex;
  justify-content: center;
}
