
/* ========== BEGIN COMMON.CSS ========== */
html {
  box-sizing: border-box;
  overflow-x: hidden;    /* added to prevent sideways scrolling */
}
*, *:before, *:after {
  box-sizing: inherit;
}


body {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  flex-direction: column;
  background-color: #ffffff; /* Changed from #fdfdfd */
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-align: center; /* Added */
  margin: 0; /* Added */
  padding: 0; /* Added */
  overflow-x: hidden; /* Added */
  overflow-y: auto; /* Ensure vertical scrolling works */
  position: relative; /* Merged from second body declaration */
  touch-action: pan-y pinch-zoom; /* Allow vertical scroll and pinch zoom on mobile */
}

.flatpickr-day.played {
  background-color: #a2d5f2;
  border: 1px solid #007acc;
  color: white;
}
#calendar {
  max-width: 400px;
  margin: 2em auto;
  padding: 1em;
  display: block;
}

.logo {
  display: block;
  max-width: 300px;
  margin-bottom: 0px;
  width: 90%; /* Added from continue.css, seems like a reasonable default */
}

.box {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 400px;
}

@media (max-width: 600px) {
  .box {
    width: 80%;
    max-width: 320px;
  }
}

.start-btn {
  background-color: #3498db;
  color: white;
  font-size: 20px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.start-btn:hover {
  background-color: #2980b9;
}

input,
button {
  font-size: 18px;
  margin: 10px 0;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

.button-base {
  color: white;
  border: none;
  border-radius: 16px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  max-width: 90%;
  min-width: 120px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 24px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #27ae60;
}

input:checked + .slider:before {
  transform: translateX(16px);
}

.beige-box {
  background-color: #fdf5e6 !important;
  border: 1px solid #e0d6c4;
}

.blue-box {
  background-color: #e8f4fd;
  border: 1px solid #cce0f5;
}

#top-scores {
  list-style: none;
  padding: 0;
}

#top-scores .entry {
  display: flex;
  justify-content: space-between;
  padding: 4px 10px;
  font-size: 16px;
}

/* Global Navigation Header Styles */
#global-nav {
  display: flex;
  justify-content: space-between; /* Changed back */
  align-items: center;
  padding: 0; /* Stays 0 for now */
  background-color: #f8f9fa; /* Lighter background */
  border-bottom: 1px solid #dee2e6; /* Lighter border */
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%; /* Ensure it spans full width */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

#global-nav-left {
  position: relative; /* For dropdown positioning context */
  display: flex;
  align-items: center; /* Align hamburger with right nav items */
}

#hamburger-btn {
  font-size: 18px; /* Same as right nav items */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0; /* Same as right nav items */
  color: #343a40; /* Same as right nav items */
  margin-left: 10px;
  line-height: 1; /* Ensure consistent line height */
  display: flex;
  align-items: center;
}

#nav-dropdown {
  display: none; /* Initially hidden, JS will toggle */
  position: absolute;
  top: 40px;  /* Position below the button */
  left: 0;
  background-color: white;
  border: 1px solid #ced4da;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
  padding: 10px;
  z-index: 1001; /* Above global-nav */
  min-width: 150px; /* Minimum width for dropdown */
}

#nav-dropdown a {
  display: block;
  margin-bottom: 8px;
  padding: 5px;
  text-decoration: none;
  color: #007bff; /* Standard link blue */
}

#nav-dropdown a:hover {
  background-color: #e9ecef; /* Hover effect */
  border-radius: 4px;
}

#global-nav-right {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;  /* ADDED */
  overflow-x: auto;   /* ADDED */
  gap: 12px;          /* ADDED */
}

#global-nav-right a,
#global-nav-right button {
  text-decoration: none;
  color: #343a40; /* Darker color for icons */
  margin-left: 0; /* Ensures individual margin is off, gap handles spacing */
  font-size: 18px; /* Slightly larger icons */
  background: none; /* Ensure buttons are transparent */
  border: none;     /* Ensure buttons have no border */
  cursor: pointer;  /* Ensure buttons show pointer */
  padding: 0;       /* Reset padding for buttons */
}

#global-nav-right a:hover,
#global-nav-right button:hover {
  color: #0056b3; /* Link hover color */
}


/* Specific styling for text-based icons if needed, for now, font-size covers it */
.page-header-logo {
  max-width: 350px; /* Consistent with .logo-main on index.html */
  height: auto;     /* Maintain aspect ratio */
  display: block;   /* For centering with margin:auto and good practice */
  margin-left: auto;  /* Center the logo */
  margin-right: auto; /* Center the logo */
  margin-bottom: 10px; /* From original inline style, seems reasonable */
}



/* fluid, capped containers for all your start-pages */
#global-nav,
#game-container,
.center-container,
#rows-container,
.box,
.title-box {
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  padding: 0 1rem;    /* optional gutter */
  margin: 0 auto;
}

/* ========== VIBRANT THEME OVERRIDES ========== */
.vibrant-theme .pair {
  background-color: #e3f2fd !important; /* Light blue instead of gray */
}

.vibrant-theme .word-box {
  background-color: #e3f2fd !important; /* Light blue instead of gray */
}

.vibrant-theme .selected {
  background-color: #ffd700 !important; /* More golden yellow */
  outline: 3px solid #ffb300 !important; /* Deeper gold outline */
}

.vibrant-theme .answer-box {
  background-color: #26d0ce !important; /* More vibrant teal */
}

.vibrant-theme .uncommon-word-box {
  background-color: #26d0ce !important; /* More vibrant teal */
}

/* Logo color filter for teal/amber theme */
.logo-main.teal-amber {
  filter: hue-rotate(150deg) saturate(1.2) brightness(0.9);
}

/* ========== END COMMON.CSS ========== */

/* ========== BEGIN GAMES.CSS ========== */
* {
  box-sizing: border-box;
}
/* Removed duplicate body declaration - all body styles consolidated at line 12 */
h1 {
  font-size: 36px;
  margin-bottom: 10px;
}
#status-bar {
  font-size: 20px;
  margin: 10px 0;
  color: #333;
}

#rows-container {
  max-width: 400px;
  margin: 0 auto;
}

#game-description {
  font-size: 18px;
  color: #444;
  margin-bottom: 20px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
#lives-container {
  margin-top: 10px;
  margin-bottom: 20px;
  font-size: 24px;
}
#lives-display {
  white-space: nowrap;
  display: inline-block;
}
.row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}
.word-box {
  padding: 8px 12px;
  background-color: #f0f0f0;
  border-radius: 8px;
  font-size: 22px;
  width: 100px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.word-box.selected {
  outline: 3px solid #ffeaa7;
  outline-offset: -2px;
  background-color: inherit; /* keeps the original color */
}

.word-box.locked {
  cursor: default;
}
.word-box.strike {
  text-decoration: line-through;
  color: #e74c3c;
}
#bonus-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  max-width: 420px;
  margin: 20px auto;
}

.bonus-word-box {
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 16px;
  margin: 4px 0;
  box-sizing: border-box;
  text-align: center;
}
.encouragement-flash {
  background-color: rgba(255, 255, 255, 0.9);
  color: #2ecc71;
  font-weight: bold;
  font-size: 20px;
  padding: 12px 20px;
  margin-top: 20px;
  border-radius: 12px;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
@keyframes flash {
  0% { opacity: 1; }
  100% { opacity: 0.3; }
}
#game-container {
  position: relative;
  padding: 30px;
  margin: 30px auto;
  max-width: 600px;
  background-color: transparent;
  box-shadow: none;
  border-radius: 0;
}
#restart {
  margin-top: 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 18px;
  cursor: pointer;
  width: auto; /* Added */
}

/* ========== END GAMES.CSS ========== */

/* ========== BEGIN NEW_INDEX.CSS ========== */
html, body {
    width: 100%;
    overflow-x: hidden !important;
    overflow-y: auto; /* Ensure vertical scrolling is allowed */
}

/* Removed duplicate body declaration - all body styles consolidated at line 12 */

.homepage-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.logo-main {
    max-width: 350px;
    height: auto;
}

.challenge-banner,
.why-banner {
    max-width: 375px;
    height: auto;
}

.spacer-20 {
    height: 20px;
}

/* New Button Layout Styles */
.new-button-layout {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the rows if their width is less than container (e.g. if parent wasn't also 350px) */
    width: 100%;
    max-width: 350px; /* To match .logo-main max-width */
    margin-top: 20px; /* Replaces margin from old .image-grid */
    margin-bottom: 20px; /* Replaces margin from old .image-grid */
    gap: 10px; /* Spacing between button rows */
}

.button-row {
    width: 100%; /* Each row takes full width of .new-button-layout (350px) */
}

.button-row a { /* Style for the anchor tags if needed, e.g., for display block */
    display: block;
}

.wide-button { /* Class for the images within the wide button links */
    width: 100%; /* Image takes full width of its 'a' tag parent */
    height: auto;
    display: block; /* Removes extra space below image if 'a' is inline */
}

.middle-buttons-container { /* Specific styling for the row containing 3 middle buttons */
    display: flex;
    justify-content: space-between; /* This will use available space. For fixed 5px gap, use gap property. */
    /* Using gap for precise 5px spacing: */
    gap: 5px;
    width: 100%; /* Full 350px width */
}

.middle-buttons-container a.middle-button-link {
    /* Each of the 3 links will take up 1/3 of space minus gaps */
    width: calc((100% - 10px) / 3); /* 10px for two 5px gaps */
    display: block;
}

.middle-button { /* Class for the images within the middle button links */
    width: 100%; /* Image takes full width of its 'a' tag parent */
    height: auto;
    display: block; /* Removes extra space below image */
}
/* ========== END NEW_INDEX.CSS ========== */

/* ========== BEGIN FINDWORDS_4L.CSS ========== */
h1 {
  font-size: 36px;
  margin: 20px 0 10px;
}
.button-green { background-color: #34a853; }  /* I GIVE UP - Pairagrams green */
.button-red   { background-color: #ea473a; }  /* SHUFFLE & GET CLUE - Pairagrams red */
.button-gray  { background-color: #7f8c8d; }  /* Submit / Clear */
.button-blue  { background-color: #4787f4; }  /* GUESS PUZZLE NOW - Pairagrams blue */

.button-green:hover { background-color: #2e8b47; }
.button-red:hover   { background-color: #d63929; }
.button-gray:hover  { background-color: #6c757d; }
.button-blue:hover  { background-color: #3366e6; }

/* Mobile responsive button styling */
@media (max-width: 600px) {
  .button-base {
    padding: 10px 12px;
    font-size: 14px;
    min-width: 0;
  }
  
  #action-button-area {
    max-width: 95% !important;
    width: 100% !important;
  }
  
  #action-button-area > div {
    width: 100% !important;
  }
  
  /* Ensure mobile scrolling works properly */
  html, body {
    height: auto !important;
    overflow-y: auto !important;
    touch-action: pan-y pinch-zoom !important;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }
  
  #guess-puzzle-btn {
    width: 95% !important;
    font-size: 14px !important;
    padding: 10px 12px !important;
  }
}

#game-header {
  background-color: rgba(255,255,255,0.95);
  margin: 0px auto; /* 🔽 tightened from 20px */
  padding: 5px 10px; /* Changed from 10px */
  border-radius: 12px;
  max-width: 600px;
  display: flex;
  flex-wrap: wrap;
      justify-content: space-between; /* Changed from center */
  align-items: center;
  gap: 30px;
}

#word-tools {
  display: none;
  margin: 10px auto 20px;
  width: fit-content;
  text-align: center;
}

#word-preview {
  font-size: 20px;            /* ✅ smaller text */
  width: 100px;               /* ✅ narrower */
  height: 34px;               /* matches button height */
  text-align: center;
  margin-bottom: 4px;
}

.stat-block {
  font-weight: bold;
  font-size: 12px; /* Changed from 18px */
}
.row {
  display: flex;
  justify-content: center;
  gap: 5px; /* Changed from 10px */
  margin: 6px 0;
}
 .pair {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  width: 75px;
  height: 55px;
  font-size: 30px;
  font-weight: normal;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}

.selected {
  background-color: #ffe066 !important;
  outline: 3px solid #f1c40f;
  outline-offset: -2px;
}
#found-words {
  margin-top: 4px; /* 🔽 reduce gap after shuffle */
  padding: 4px;
}

#found-words h3 {
  margin: 8px 0 4px 0;
}
#word-list {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: 12px;
  padding: 0;
  list-style: none;
  max-width: 360px;
  margin: 0 auto 10px;
}
#word-list,
.correct-grid {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  gap: 12px;
  margin: 0 auto 10px;
}

#correct-words-section {
  display: none;
  margin-top: 10px;
}
.correct-grid {
  /* change this… */
  max-width: 360px;    /* ← exactly what #word-list uses */
  margin: 10px auto 0;
}

.done-btn {
  background-color: #27ae60;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px 30px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  margin: 40px auto 20px;
  display: block;
}

/* ─── 1) Shared “word‐box” base (same as .answer-box) ─── */
/* ─── shared base for every word‐box variant ─── */
.answer-box,
.bonus-word-box,
.common-word-box,
.uncommon-word-box,
.hard-word-box {
  padding: 6px; /* Changed */
  border-radius: 12px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  min-width: 50px; /* Changed */
  height: 32px; /* Added */
  /* min-height: 30px; */ /* Commented out or removed */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;                    /* no extra per-item margin */
  border: 2px solid transparent;/* default border, overridden below */
  box-sizing: border-box;
  color: black;
}

/* ─── then only tweak what’s different ─── */
.common-word-box {
  background-color: lightgreen;
  border-color: transparent;
}

.bonus-word-box {
  background-color: #81ecec;
}

.uncommon-word-box {
  /* background is set inline by your JS colors */
  border-color: black;
  border-width: 4px;
}

.hard-word-box {
  background-color: gold;
  border-color: black;
  border-width: 4px;
}

/* ─── 2) Common & answer boxes (identical look) ─── */
.answer-box,
.bonus-word-box {
  background-color: #81ecec;    /* same turquoise as your answer-box :contentReference[oaicite:0]{index=0}:contentReference[oaicite:1]{index=1} */
}

#action-button-area {
  text-align: center;
}

#action-button-area button {
  width: auto;
  display: inline-block;
  vertical-align: middle;
  padding: 6px 12px; /* Adjusted padding */
  font-size: 14px;   /* Adjusted font-size */
}

#hangman-display {
  text-align: center;
  font-size: 24px;
  letter-spacing: 4px; /* Controls spacing between characters */
  margin-top: 15px;
  margin-bottom: 10px;
  color: #333333; /* A dark gray color for visibility */
}


/* ========== FLOATING WORD BOX ========== */
.floating-word-box {
  position: absolute;
  background-color: white;
  border: 2px solid #888;
  border-radius: 12px;
  padding: 0.6em 1em;
  max-width: 80%;
  z-index: 9999;
  font-size: 1rem;
  box-shadow: 0px 6px 18px rgba(0, 0, 0, 0.2);
  text-align: center;
}
