/* Reset some default styles */
body, h1, h2, h3, h4, h5, h6, p, ul, li {
  margin: 0;
  padding: 0;
}

body {
  background: #fafafa;
  color: #333333;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.form-container {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin: 50px auto;
  max-width: 400px;
  padding: 20px;
  text-align: left;
}

.registration-form fieldset {
  border: none;
  padding: 0;
}

.registration-form legend {
  font-size: 1.5em;
  margin-bottom: 10px;
  text-align: center;
}

.registration-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.registration-form input {
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 1em;
  margin-bottom: 5px;
  padding: 10px;
  width: 100%;
}

.registration-form input[type="checkbox"] {
  width: auto;
  display: inline-block;
  padding: 0;
}

.registration-form .helptext ul {
  list-style-type: none;
  padding: 0;
  margin: 5px 0 15px 0;
}

.form-actions {
  text-align: center;
}

.btn-submit {
  background-color: #4CAF50;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 1em;
  padding: 10px 20px;
  text-align: center;
}

.btn-submit:hover {
  background-color: #45a049;
}

.update-button {
  font-size: 1.2em;
  padding: 10px 20px;
  margin-top: 10px;
}

.signin-link {
  text-align: center;
  margin-top: 10px;
}

.signin-link a {
  color: #007BFF;
  text-decoration: none;
}

.signin-link a:hover {
  text-decoration: underline;
}







.header {
  background-color: #0969faed;
  color: white;
}

.navbar {
  display: flex;
  justify-content: space-around;
  padding: 10px;
  flex-wrap: wrap;
}

.navbar-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.navbar-item {
  margin: 0 10px;
}

.navbar-link {
  color: white;
  text-decoration: none;
  padding: 10px;
  text-align: center;
  white-space: nowrap;
}

.random-puzzle-form {
  text-align: center;
  margin: 10px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px; /* Reduced padding */
  flex-wrap: wrap; /* Ensure elements wrap on smaller screens */
}

.header-table {
  width: 100%;
  border-spacing: 0 10px; /* Add some spacing between rows */
}

.header-cell {
  vertical-align: middle;
  padding: 0 10px;
}

.logo-cell {
  width: 15%;
}

.logo {
  width: 100%;
  height: auto;
  max-width: 150px; /* Ensure the logo doesn't get too large */
}

.header-text-cell {
  text-align: center;
}

.user-info-cell {
  text-align: right;
}

.highlight {
  color: red;
}

.highlight.small {
  font-size: small;
}

.user-info {
  text-align: right;
  margin-left: auto; /* Ensure it aligns to the right */
}

.user-details {
  padding: 10px;
  border-radius: 5px;
}

.user-details a {
  color: blue; /* Standard link color */
  text-decoration: underline;
}

.main-content {
  display: flex;
  justify-content: center; /* Center the content horizontally */
  align-items: center; /* Center the content vertically if needed */
  flex: 1;
  padding: 20px;
}

.content {
  width: 100%;
  max-width: 800px; /* Set a max width for better readability */
}

.wide-content {
  width: 100%;
  max-width: 1200px; /* or even none */
  margin: auto;
}


.footer {
  background-color: #0969faed;
  color: white;
  padding: 10px;
  text-align: center;
}

/* Responsive table */
.wwstdtable {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%; /* Make the table width 100% */
}

.wwstdtable tr:nth-child(even) {
  background-color: #f2f2f2;
}

.wwstdtable tr:hover {
  background-color: #ddd;
}

.wwstdtable th, .wwstdtable td {
  padding: 1em; /* Use em units for padding */
  text-align: center;
}

.wwstdtable th {
  background-color: #0969faed;
  color: white;
}

@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    align-items: center;
  }

  .header-content {
    flex-direction: column;
    align-items: center;
  }

  .main-content {
    flex-direction: column;
  }

  .content-left {
    padding-right: 0;
  }

  .header-table {
    width: 100%;
    border-spacing: 0 5px;
  }

  .header-cell {
    display: block;
    width: 100%;
    text-align: center;
  }

  .logo-cell {
    width: 40%;
  }

.logo {
    max-width: 100px;
  }

  .user-info-cell {
    text-align: center;
  }
}

/* Global mobile header sizing for consistency across pages */
@media (max-width: 768px) {
  /* Make the logo smaller on mobile to match gameplay views */
  .header-table .logo-cell .logo { max-width: 40px; height: auto; }
  /* Align user info to top and compact text spacing */
  .header-table .user-info-cell { vertical-align: top; }
  .header-table .user-info-cell .user-details { font-size: 11px; line-height: 1.2; }
  .header-table .user-info-cell .user-details p { margin: 2px 0; }
  /* Reduce promo text size in header text cell */
  .header-table .header-text-cell p { font-size: 0.75em; }
  /* Slightly tighter header table spacing on mobile */
  .header-table { border-spacing: 0 2px; }
  .header-table .header-cell { padding: 0 4px; }
}

/* Demote heading sizes by one level on mobile */
@media (max-width: 768px) {
  h1 { font-size: 1.5em; }    /* behaves like h2 */
  h2 { font-size: 1.17em; }   /* behaves like h3 */
  h3 { font-size: 1em; }      /* behaves like h4 */
  h4 { font-size: 0.83em; }   /* behaves like h5 */
  h5 { font-size: 0.67em; }   /* behaves like h6 */
  /* h6 remains the same (no lower level) */
}

.badge-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-left: 4px;
}

/* Larger badge for all-time points leader */
.badge-icon-lg {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-left: 4px;
}

/* Enlarge keyboard mode subword/rootword buttons and space their boxes */
.kbd-word-btn {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  letter-spacing: 2px;
  padding: clamp(0.4em, 1vw + 0.2em, 0.6em) clamp(0.8em, 2vw + 0.2em, 1.2em);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin: 1px;
}

.kbd-word-btn.active {
  background-color: #ffffe0;
}

.kbd-word-btn.solved {
  background-color: green;
  color: white;
  border-radius: 0;
  box-shadow: none;
}

.kbd-word-btn.solved:disabled {
  background-color: green;
  color: white;
  border-radius: 0;
  box-shadow: none;
  opacity: 1;
}

/* Enlarge keys for on-screen keyboard */
.kbd-key {
  width: 2.4em;
  height: 2.4em;
  margin: 2px;
  font-size: 120%;
}

.kbd-key.special {
  width: 3.6em;
}
