html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    font-family: Arial, sans-serif;
    display: grid;
    grid-template-rows: auto 1fr; /* navbar auto, content fills */
}


.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #3066be;

    background-image:
      linear-gradient(45deg, #2a56a0 25%, transparent 25%),
      linear-gradient(-45deg, #2a56a0 25%, transparent 25%),
      linear-gradient(45deg, transparent 75%, #2a56a0 75%),
      linear-gradient(-45deg, transparent 75%, #2a56a0 75%),
      repeating-linear-gradient(
          45deg,
          rgba(255, 255, 255, 0.05),
          rgba(255, 255, 255, 0.05) 2px,
          transparent 2px,
          transparent 10px
      );
    background-size: 40px 40px, 40px 40px, 40px 40px, 40px 40px, 20px 20px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px, 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: backgroundShift 20s linear infinite;
    position: sticky;
    top: 0;
    z-index: 1000;
}

@keyframes backgroundShift {
    0% {
        background-position: 0 0, 0 20px, 20px -20px, -20px 0px, 0 0;
    }
    100% {
        background-position: 40px 40px, 40px 60px, 60px 20px, 20px 40px, 20px 20px;
    }
}

.navbar-title {
    color: #fffff2;
    font-size: clamp(2rem, 5vw, 4rem);
    font-family: 'Dancing Script', cursive;
}

.navbar-links a {
    color: #f2f2f2;
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-weight: bold;
    font-size: clamp(1.5rem, 4vw, 2rem);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;;
}

.navbar-links a:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Softer, matches the gradient */
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1); /* Subtle white glow */
    color: #ffffff; /* Bright white on hover */
    border-radius: 8px;
    backdrop-filter: blur(2px); /* Optional: softens the bg subtly */
    transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}


.container {
  display: flex;
  flex-wrap: wrap;  /* allows items to wrap to next line */
  height: 100%;
  overflow: auto;   /* now if vertical overflow happens, it scrolls */
}


.options, .words-display {
  flex: 1 1 300px;  /* they’ll try to be at least 300px, but can wrap */
  min-width: 250px; /* adjust so they don’t shrink too far */
  box-sizing: border-box;
}


.options{
    border-right: solid;
}
/* When stacked in column */
@media (max-width: 600px) {
  .options {
    border-right: none;
    border-bottom: solid;
  }
}

.site-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.about-section {
    margin-top: 2rem;
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 5px;
}


.option{
    display: flex;
    font-size: 20px;
    justify-content: center;
}

.option-label{
    display: flex;
    font-size: clamp(1rem, 4vw, 2rem);
    justify-content: center;
    flex-direction: column;
    flex-wrap: wrap;
}

.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2vw, 1rem);
  margin-top: 0.5rem;
  justify-content: center;
  align-items: center;
  padding-left: 0; /* or a small rem value */
}

.size-options label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: bold;
  cursor: pointer;
}

.size-options input[type="radio"] {
  display: none;
}

.size-box {
  /* responsive padding & font */
  padding: clamp(0.3rem, 1.5vw, 0.8rem) clamp(0.8rem, 4vw, 1.2rem);
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  border: 2px solid #ccc;
  border-radius: 5px;
  background-color: white;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s, border-color 0.3s;
  flex: 1 1 auto;
  min-width: 80px;
  max-width: 150px;
  box-sizing: border-box;
  word-break: break-word;
}

/* When selected, highlight the box */
input[type="radio"]:checked + .size-box {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}


#min-word-length {
    width: 50px;          /* smaller width */
    height: 30px;         /* smaller height */
    font-size: 1rem;      /* adjust font size */
    padding: 4px 6px;     /* smaller padding */
    box-sizing: border-box;
    vertical-align: middle;
    text-align: center;   /* center the number horizontally */
    border-radius: 4px;
    border: 1px solid #ccc;
}

.number-input {
    display: flex;
    justify-content: center;  /* horizontal centering */
    align-items: center;      /* vertical centering */
    gap: 0.5rem;              /* optional space between input and text */
    padding-left: 20px;
}

.info-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: #007bff;
    font-weight: bold;
}

.tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;  /* position above the icon */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    pointer-events: none;
}

.info-icon:hover .tooltip-text,
.info-icon:focus .tooltip-text {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.dice-button {
    padding: 0.4rem 1rem;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.3s;
}

#toggle-dice:hover {
    background-color: #0056b3;
}

#dice-container {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.dice-row {
    display: flex;
    gap: 0.3rem;
}

.dice-letter {
    width: 2rem;
    height: 2rem;
    text-align: center;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

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

.dice-label{
    display: flex;
    justify-content: center;
    align-items: center;
}

.words-display{
    font-size: clamp(1rem, 4vw, 2rem);
    height: 100%;
    padding-left: 1em;
}

.start-button {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.start-button button {
    width: 80%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.start-button button:hover {
    background-color: #0056b3;
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
}

.start-button button:active {
    background-color: #004a99;
    transform: scale(0.98);
    box-shadow: 0 3px 6px rgba(0, 123, 255, 0.2);
}



#word-search {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.word-list-container {
    flex: 1;
    overflow-y: auto;
    max-height: 85%; /* now respects parent */
}


.word-list {
    list-style: decimal inside;
    padding-left: 0;
    margin: 0;
    font-family: monospace;
    white-space: pre;
    height: 100%;
    min-width: max-content; /* ✅ expands to fit widest item */
}



.word-list li {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    font-family: monospace;
    display: block;    
    width: 100%;           
    box-sizing: border-box;
    white-space: pre;      
}


.word-list li:nth-child(odd) {
    background-color: #f1f1f1;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

@keyframes sway {
    0% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
    100% { transform: rotate(-2deg); }
}

.boggle-board {
    display: grid;
    grid-template-columns: repeat(3, 90px); /* increased from 60px */
    grid-gap: 15px; /* increased gap */
    padding: 30px; /* increased padding */
    background-color: #007BFF;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

    animation: sway 2.5s ease-in-out infinite;
    transform-origin: center;
}

.tile {
    width: 90px; /* increased from 60px */
    height: 90px; /* increased from 60px */
    background-color: #fff;
    border: 2px solid #999;
    font-size: 36px; /* increased from 24px */
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}



#dice-scroll-container {
  max-height: 50vh;
  overflow-y: auto;
  border: 1px solid #ccc; /* optional, for visual boundary */
  padding: 0.5rem;
  background-color: #f9f9f9; /* optional, subtle background */
  border-radius: 8px; /* rounded corners */
}


.info-box {
    flex: 1;
    overflow-y: auto;
    margin: 1em;
    max-height: 60%; /* ensures it doesn't overflow parent */
    background: #f0f4ff;
    border: 1px solid #aac0ff;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    color: #204080;
    box-shadow: 0 2px 8px rgba(48, 102, 190, 0.15);
    font-size: clamp(0.5rem, 2.5vw, 1.5rem);
}

.info-box h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}
.info-box ul {
  padding-left: 1.25rem;
  margin: 0;
}
.info-box ul li {
  margin-bottom: 0.5rem;
}

