
/* ========== BEGIN COMMON.CSS ========== */

/* CSS Custom Properties - Design System Variables */
:root {
  /* Colors */
  --primary-color: #3498db;
  --primary-dark: #2980b9;
  --primary-light: #5dade2;
  --secondary-color: #2ecc71;
  --secondary-dark: #218838;
  --accent-color: #e74c3c;
  --success-color: #28a745;
  --success-dark: #1e7e34;
  --warning-color: #ffc107;
  --warning-dark: #e0a800;
  --danger-color: #dc3545;
  --background-color: #ffffff;
  --surface-color: #f8f9fa;
  --bg-light: #f8f9fa;
  --bg-hover: #e9ecef;
  --text-color: #2c3e50;
  --text-dark: #333333;
  --text-light: #7f8c8d;
  --text-muted: #666666;
  --border-color: #dee2e6;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  
  /* Typography */
  --font-family-base: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-xxl: 32px;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-loose: 1.75;
  
  /* Layout */
  --border-radius: 8px;
  --border-radius-sm: 4px;
  --border-radius-lg: 12px;
  --touch-target-min: 44px;
  --container-max-width: 1200px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 8px rgba(0,0,0,0.15);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.35s ease;
  
  /* Z-index scale */
  --z-dropdown: 1000;
  --z-modal: 1001;
  --z-tooltip: 1002;
}

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


body {
  font-family: var(--font-family-base);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: var(--line-height-normal);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  touch-action: pan-y pinch-zoom;
  /* Removed conflicting flexbox properties that force centering */
}

/* ========== ACCESSIBILITY IMPROVEMENTS ========== */

/* Universal touch target size enforcement */
button, 
input[type="button"], 
input[type="submit"],
input[type="reset"],
.btn,
.button,
.keyboard-key,
.segment-button,
.ladder-segment,
.letter-cell,
.clickable {
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  padding: var(--spacing-sm) var(--spacing-md);
}

/* Focus states for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
.clickable:focus,
[tabindex]:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

/* Remove outline for mouse users, keep for keyboard users */
button:focus:not(:focus-visible),
.clickable:focus:not(:focus-visible) {
  outline: none;
}

/* Ensure adequate color contrast */
.text-muted,
.text-secondary {
  color: var(--text-light);
}

/* Interactive element states */
button,
.btn,
.clickable {
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: var(--border-radius);
}

button:hover:not(:disabled),
.btn:hover:not(.disabled),
.clickable:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

button:active:not(:disabled),
.btn:active:not(.disabled),
.clickable:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

button:disabled,
.btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== STANDARDIZED BUTTON SYSTEM ========== */

/* Base button styles */
.btn-base,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: var(--line-height-tight);
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  padding: var(--spacing-sm) var(--spacing-md);
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

/* Primary button */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
  background-color: var(--primary-dark);
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Secondary button */
.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #27ae60;
  border-color: #27ae60;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Outline button */
.btn-outline {
  background-color: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Success button */
.btn-success {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: white;
}

/* Warning/accent button */
.btn-warning {
  background-color: #f39c12;
  border-color: #f39c12;
  color: white;
}

/* Danger button */
.btn-danger {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

/* Button sizes */
.btn-sm {
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: var(--font-size-sm);
  min-height: 36px;
}

.btn-lg {
  padding: var(--spacing-md) var(--spacing-lg);
  font-size: var(--font-size-lg);
  min-height: 52px;
}

/* Button groups */
.btn-group {
  display: inline-flex;
  gap: var(--spacing-xs);
}

.btn-group .btn-base:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.btn-group .btn-base:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Game-specific button overrides */
.game-btn {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.keyboard-key {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-weight: 600;
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
}

.keyboard-key:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-color);
  color: white;
}

.keyboard-key.used {
  background-color: #95a5a6;
  color: white;
  cursor: not-allowed;
}

.keyboard-key.correct {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: white;
}

.keyboard-key.incorrect {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

/* ========== LAYOUT UTILITIES ========== */

/* Container system */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-md);
}

/* Flexbox utilities */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-grow-1 { flex-grow: 1; }

/* Grid utilities */
.d-grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Spacing utilities */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-muted { color: var(--text-light); }
.font-bold { font-weight: 600; }
.font-normal { font-weight: 400; }
.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }

/* Display utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

/* Position utilities */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }

/* Border utilities */
.border { border: 1px solid var(--border-color); }
.border-0 { border: 0; }
.rounded { border-radius: var(--border-radius); }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-lg { border-radius: var(--border-radius-lg); }

/* Shadow utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Responsive utilities */
@media (max-width: 768px) {
  .d-md-none { display: none; }
  .d-md-block { display: block; }
  .flex-md-column { flex-direction: column; }
  .text-md-center { text-align: center; }
  .grid-cols-md-1 { grid-template-columns: 1fr; }
  .grid-cols-md-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .d-sm-none { display: none; }
  .d-sm-block { display: block; }
  .text-sm-center { text-align: center; }
  .grid-cols-sm-1 { grid-template-columns: 1fr; }
}

.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 {
    width: 100%;
    height: 100%;
}

/* Body styles consolidated above - removed duplicate declaration */

/* 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;
  max-width: var(--board-width, 500px);
  width: var(--board-width, 500px);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

#found-words h3 {
  margin: 8px 0 4px 0;
}
#word-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pair-gap, 3px);
  justify-content: flex-start;
  padding: 0;
  list-style: none;
  max-width: var(--board-width, 500px);
  width: var(--board-width, 500px);
  margin: 0 auto 10px;
  box-sizing: border-box;
}

.found-word {
  background-color: rgb(240, 240, 248);
  color: rgb(145, 139, 170);
  padding: 4px 2px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  margin: 0;
  text-transform: uppercase;
  border: none;
  display: inline-block;
  flex: 1 1 calc((100% - (var(--pair-gap, 3px) * 5)) / 6);
  width: calc((100% - (var(--pair-gap, 3px) * 5)) / 6);
  max-width: calc((100% - (var(--pair-gap, 3px) * 5)) / 6);
  min-width: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
  min-height: 20px;
}

.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;
}
