/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&display=swap');


/* Reset & base */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1.4;
  color: #111;
}

#main-nav {
  display: flex;
  justify-content: space-between;
  padding: 1rem 2rem;
}

#main-nav a {
  text-decoration: none;
  font-weight: 700;
}

.find-container {
  text-align: center;
  margin: 2rem 0;
}
.find-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #555;
}
.find-word {
  display: block;
  font-size: 4rem;
  margin-top: 0.25rem;
}

#status-bar {
  text-align: center;
  margin: 1rem 0;
}
#status-bar span {
  font-weight: 700;
}

#word-summary {
  font-family: Georgia, serif;
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1rem;
  text-align: center;
  line-height: 1.8;
  white-space: pre-wrap; /* keep line breaks tidy */
}

.word-token {
  cursor: pointer;
  color: inherit;
  text-decoration: underline;
}
.word-token:hover {
  color: #0077cc;
}

#breadcrumb {
  max-width: 80%;
  margin: 0 auto 1rem;
  font-size: 0.9rem;
  background: #ffff;
  font-size: 0.9rem;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  cursor: default;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.breadcrumb-item {
  cursor: pointer;
}



nav {
  background: #ffff;
  padding: 0.5rem 1rem;
 
}
nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
nav a {
  color: #111;
  text-decoration: none;
  font-weight: normal;
}
nav a:hover {
  text-decoration: underline;
}


.nav-buttons{
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;

}


#target-word {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: clamp(2.5rem, 10vw, 6rem); /* scales from ~40px up to 96px */
  white-space: pre-wrap;
  text-decoration: none;
  font-weight: normal;
}




/* Layout containers */
#game-header {
  padding: 1rem;
  background: #ffff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 10vh;
}
#word-summary {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}
#link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid #ddd;
}
#status-bar {
  background: #ffff;
  text-align: center;
}

/* Utility classes */
.hidden {
  display: none !important;
}

/* Link buttons */
.btn-link {
  background: none;
  border: none;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.9rem;
}
.btn-link:hover {
  color: #0077cc;
}

/* Timer / Status styling */
.timer {
  font-weight: bold;
}


/* Responsive adjustments */
@media (max-width: 600px) {
  body {
    flex-direction: column;
  }
  #link-list {
    flex-direction: column;
  } 
    #game-header, #status-bar {
        text-align: center;
    }
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    nav a {
        padding: 0.5rem 0;
    }
}
@media (min-width: 601px) {
  #link-list {          
    flex-direction: row;
  }
  nav ul {
    justify-content: center;
  }
  nav a {
    padding: 0.5rem 1rem;
  }
}
/* Additional styles for better readability */
#word-summary p {
  margin: 0.5rem 0;
  line-height: 1.6;
}
#word-summary h2 {
  margin-top: 1rem;
  font-size: 1.25rem;
}
#word-summary ul {
  list-style-type: disc;
  padding-left: 1.5rem;
}
#word-summary li {
  margin-bottom: 0.5rem;
}
#status-bar p {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}
#game-header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
  text-align: center;
}
#game-header p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}
#link-list li {
  flex: 1;
  text-align: center;
}
#link-list li a {
  display: block;
  padding: 0.5rem;
  background: #e0e0e0;
  border-radius: 4px;
  color: #333;
}
#link-list li a:hover {
  background: #d0d0d0;
}






/* Modal backdrop */
/* Modal background */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal content box */
.modern-modal {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  animation: fadeInUp 0.35s ease;
}

/* Heading & subtext */
.modern-modal h2 {
  margin-top: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #222;
}
.modal-subtext {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1.5rem;
}

/* Radio buttons list */
.modal-form label {
  display: block;
  text-align: left;
  padding: 0.5rem 0.75rem;
  margin: 0.25rem 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s ease;
}
.modal-form input[type="radio"] {
  margin-right: 8px;
}
.modal-form label:hover {
  background: #f0f0f0;
  border-color: #aaa;
}

/* Start button */
.start-btn {
  margin-top: 1rem;
  width: 100%;
  background: #0077ff;
  color: #fff;
  font-weight: 600;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.start-btn:hover {
  background: #005fcc;
}

/* Animation */
@keyframes fadeInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}



/* Close button */
.btn-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

/* History list items */
#history-list {
  list-style: none;
  margin: 1rem 0 0 0;
  padding: 0;
}
#history-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}







/* new: make word-tokens appear like inline text, but clickable */
.word-token {
  cursor: pointer;
  /* inherit your body color so it doesn’t look like a button */
  color: inherit;
  /* no extra padding or background */
  background: none;
  border: none;
  padding: 0;
  /* optional: slightly underline to hint clickability */
  text-decoration: none;
}
.word-token:hover {
  /* subtle hover cue */
  text-decoration: underline;
  color: #0077cc;
}

/* Breadcrumb container */


/* Each crumb */
.breadcrumb-item {
  display: inline-block;
  margin-right: 0.5rem;
  color: #0077cc;
}
.breadcrumb-item::after {
  content: "›";
  margin-left: 0.5rem;
  color: #555;
}
.breadcrumb-item:last-child::after {
  content: "";
}

/* Generic action button */
.btn-action {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #0077cc;
  color: #fff;
  border: none;
  border-radius: 0.25rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-action:hover {
  background: #005fa3;
}


.breadcrumb-item {
  display: inline-block;
  margin-right: 0.5rem;
  color: #0077cc;
  cursor: pointer;           /* makes the pointer icon appear */
}
.breadcrumb-item:hover {
  text-decoration: underline;/* optional: give a hover cue */
}

/* make sure modal covers the screen */
#category-modal.modal {
  display: flex;
}
#category-modal.hidden {
  display: none !important;
}

.category-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 5000px;
}


.credit-footer {
  position: sticky;   /* was fixed */
  bottom: 0;
  z-index: 30;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(0,0,0,0.5);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  background: #fff;
}


.credit-footer a {
  color: rgba(0, 0, 0, 0.6);
  text-decoration: none;
  font-weight: 600;
  pointer-events: auto; /* make link clickable again */
}

.credit-footer a:hover {
  color: rgba(0, 0, 0, 0.9);
  text-decoration: underline;
}



@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
    gap: .5rem;
  }
  .nav-buttons {
    flex-direction: column;
    gap: .5rem;
  }
  #status-bar {
    font-size: 0.85rem;
  }
  #word-summary {
    padding: 0.75rem;
    font-size: 0.95rem;
  }
}

/* Ensure footer doesn't overlap guides */
.credit-footer{
  position: sticky; bottom: 0; z-index: 30;
  background: #fff;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

