/* ==========================================================================
   1. VARIABLES & FONTS
   ========================================================================== */
@font-face {
  font-family: "Renogare";
  src: url("assets/fonts/renogare-regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-main: #060913;
  --bg-card: #0f1626;
  --bg-input: #17223b;
  --text-main: #ffffff;
  --text-muted: #94a3b8;

  --color-correct: #10b981;
  --color-partial: #f59e0b;
  --color-not-totally-wrong: #f97316;
  --color-wrong: #ef4444;

  --color-indigo: #6366f1;
  --color-indigo-hover: #4f46e5;
  --color-discord: #5865f2;
}

/* ==========================================================================
   2. GENERAL CONFIGURATION & CURSORS
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Renogare", "Segoe UI", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

body,
body * {
  cursor: none !important;
}

#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

#custom-cursor img {
  width: 48px;
  height: auto;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
}

body.no-custom-cursor,
body.no-custom-cursor * {
  cursor: auto !important;
}

body.no-custom-cursor a,
body.no-custom-cursor button,
body.no-custom-cursor [role="button"],
body.no-custom-cursor input[type="submit"],
body.no-custom-cursor input[type="button"] {
  cursor: pointer !important;
}

body.no-custom-cursor input[type="text"],
body.no-custom-cursor textarea {
  cursor: text !important;
}

#default-cursor {
  transform: translate(-1.5px, -26px);
}

#pointer-cursor {
  transform: translate(0, 0);
}

#text-hover-cursor {
  transform: translate(-10px, -2px);
}

h1,
h2,
h3,
h4,
th,
.btn-celeste,
#try-count,
.discord-sidebar-link {
  font-family: "Renogare", "Segoe UI", sans-serif;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   3. LAYOUT & MAIN GRID
   ========================================================================== */
#layout-wrapper {
  display: grid;
  grid-template-columns: 1fr 800px 1fr;
  gap: 30px;
  max-width: 100%;
  width: 100%;
  align-items: start;
  flex: 1;
}

#message-container,
.win-message,
.lose-message {
  width: 100%;
  box-sizing: border-box;
}

#left-sidebar-column {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 450px;
  justify-self: center;
  margin-top: 200px;
}

#main-content-column {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 800px;
  gap: 8px;
  padding: 0 12px;
  margin-top: 0;
}

#main-content-column h1 {
  text-align: center;
  font-size: 3.5rem;
  margin-bottom: 0px;
}

#game-container {
  width: 100%;
}

#rules-sidebar {
  width: 100%;
  margin-top: 8px;
}
.tries-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#game-timer-display {
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
#right-sidebar-column {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 450px;
  justify-self: center;
  margin-top: 200px;
}

#discord-sidebar {
  margin-top: 0;
}

#timer-sidebar {
  text-align: center;
}

#timer-sidebar h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

#next-word-timer {
  font-family: "Renogare", sans-serif;
  font-size: 1.4rem;
  margin: 4px 0;
  color: var(--color-indigo);
}

.small-subtext {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   4. FOOTER & LEGAL PAGES
   ========================================================================== */
#site-footer {
  width: 100%;
  text-align: center;
  padding: 16px 0 10px 0;
  margin-top: auto;
}

.legal-link {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.legal-link:hover {
  opacity: 1;
  color: var(--text-main);
  text-decoration: underline;
}

#disclaimer-block {
  width: 100%;
  border-left: 4px solid #6366f1;
  background: linear-gradient(
    180deg,
    rgba(99, 102, 241, 0.14),
    rgba(15, 23, 42, 0.05)
  );
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 18px 22px;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.18);
  color: var(--text-main);
  line-height: 1.6;
}

#legal-notice {
  width: 100%;
  background-color: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 24px 26px;
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.legal-page-block {
  background:
    radial-gradient(
      circle at top right,
      rgba(99, 102, 241, 0.14),
      transparent 35%
    ),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
  border-radius: 20px;
  padding: 28px 30px;
}

/* ==========================================================================
   5. SIDEBAR BLOCKS & COMMUNITY STATS
   ========================================================================== */
.sidebar-block {
  background-color: var(--bg-card);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  height: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 4px;
}

.sidebar-header h3 {
  margin: 0 !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  line-height: 1;
}

.sidebar-header-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: -4px;
  margin-bottom: -4px;
}

.sidebar-block h2,
.sidebar-block h3:not(.sidebar-header h3) {
  margin-bottom: 8px;
  font-size: 1.1rem;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 4px;
}

.sidebar-block h4 {
  margin: 10px 0 4px 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sidebar-block ul {
  list-style-type: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stats-list p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.stats-list span {
  color: var(--text-main);
  font-family: "Renogare", sans-serif;
  font-weight: bold;
}

.discord-promo-content {
  display: flex;
  flex-direction: column;
  height: auto;
}

.discord-promo-content p {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-muted);
}

/* ==========================================================================
   6. BUG REPORT BLOCK & BUTTON
   ========================================================================== */
.bug-card {
  background-color: var(--bg-card);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.bug-card h3 {
  font-family: "Renogare", sans-serif;
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.bug-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 10px;
}

#report-bug-btn {
  width: 100%;
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.2),
    rgba(185, 28, 28, 0.3)
  );
  border: 1px solid var(--color-wrong);
  color: #fca5a5;
  font-family: "Renogare", sans-serif;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

#report-bug-btn:hover {
  background: var(--color-wrong);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

#report-bug-btn:active {
  transform: translateY(0);
}

#reporticon {
  width: 44px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
  margin-right: -8px;
}

/* ==========================================================================
   7. GAME CONTROLS & STATUS BAR
   ========================================================================== */
#game-status {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-radius: 8px;
  background-color: rgba(15, 22, 38, 0.55);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

#game-status button,
.tries-badge,
.status-link-btn,
.sidebar-toggle-btn {
  font-family: "Renogare", sans-serif;
  font-size: 0.88rem;
  height: 38px;
  padding: 0 4px;
  border-radius: 6px;
  font-weight: normal;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  gap: 8px;
}

.tries-badge {
  background-color: var(--bg-input);
  border: 1px solid #334155;
  color: var(--text-muted);
}

#hint-btn {
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--color-partial);
  color: #fef3c7;
}

#hint-btn:hover {
  background-color: var(--color-partial);
  color: #000000;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

#personalized-btn {
  background-color: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--color-indigo);
  color: #c7d2fe;
}

#personalized-btn:hover {
  background-color: var(--color-indigo);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

#giveup-btn {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--color-wrong);
  color: #fca5a5;
}

#giveup-btn:hover {
  background-color: var(--color-wrong);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.btn-icon {
  height: 36px;
  width: auto;
  object-fit: contain;
}

#rules-btn {
  background-color: #70a7d4;
  border-color: #2571af;
  color: #ffffff;
  width: 100%;
}

#rules-btn:hover {
  background-color: #3b82f6;
  border-color: #1e40af;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.status-link-btn {
  background-color: var(--bg-card);
  border-color: #4f46e5;
  color: var(--text-main);
  text-decoration: none;
}

.status-link-btn:hover {
  background-color: rgba(99, 102, 241, 0.12);
  transform: translateY(-1px);
}

#options-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  background: transparent;
  border: none;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 1000;
}

#options-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

#options-btn .btn-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

#share-btn {
  display: none !important;
  background-color: var(--color-correct);
  border-color: var(--color-correct);
  color: #ffffff;
}

/* ==========================================================================
   7b. SOCIAL LINKS (DISCORD, GITHUB, KO-FI)
   ========================================================================== */
.social-sidebar-link {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.social-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  object-fit: contain;
}

.discord-sidebar-link {
  background-color: var(--color-discord);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.2);
}

.discord-sidebar-link:hover {
  background-color: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(88, 101, 242, 0.4);
}

.github-sidebar-link {
  background-color: #2f363f;
  box-shadow: 0 4px 12px rgba(47, 54, 63, 0.35);
}

.github-sidebar-link:hover {
  background-color: #1f242b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(47, 54, 63, 0.5);
}

.kofi-sidebar-link {
  background-color: rgba(255, 94, 91, 0.15);
  border: 1px solid rgba(255, 94, 91, 0.35);
  color: #ff8583 !important;
  box-shadow: 0 4px 12px rgba(255, 94, 91, 0.15);
}

.kofi-sidebar-link:hover {
  background-color: rgba(255, 94, 91, 0.3);
  border-color: rgba(255, 94, 91, 0.6);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 94, 91, 0.35);
}

.kofi-sidebar-link:active {
  transform: translateY(0);
}

/* ==========================================================================
   8. GAME FORM & SUGGESTIONS
   ========================================================================== */
#guess-form {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
}

.input-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

#element-input {
  width: 100%;
  padding: 12px 45px 12px 16px;
  border-radius: 8px;
  border: 2px solid #334155;
  background-color: var(--bg-input);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

#element-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

#guess-form #guess-btn[type="submit"] {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  cursor: pointer;
}

#guess-form #guess-btn[type="submit"]:hover {
  background: transparent !important;
  border: none !important;
}

.btn-icon-primary {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.hint-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

#hint-counter {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hint-list {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background-color: var(--bg-input);
  border: 2px solid #334155;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  box-sizing: border-box;
}

.suggestions-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background-color: var(--bg-input);
  border: 2px solid #334155;
  border-radius: 8px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: background-color 0.15s ease;
}

.suggestion-item:hover,
.suggestion-item.selected {
  background-color: var(--color-indigo);
  color: #ffffff;
}

.synonym-marker {
  width: 20px;
  height: 20px;
  margin-left: 8px;
  vertical-align: middle;
  filter: invert(1) sepia(0) saturate(0) hue-rotate(180deg) brightness(2);
}

.suggestion-thumb,
.hint-thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.hint-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  cursor: pointer;
}

.entity-thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-right: 12px;
  vertical-align: middle;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pixelated {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}

#show-all-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#show-all-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

#show-all-btn:hover {
  opacity: 1;
}

/* ==========================================================================
   9. GUESSES TABLE
   ========================================================================== */
#guesses-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  margin-top: 10px;
}

#guesses-table th {
  padding: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

#guesses-table td {
  padding: 10px 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  text-transform: capitalize;
}

#guesses-table tr td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

#guesses-table tr td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.synonym-indicator {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  opacity: 0.95;
}

.correct {
  background-color: var(--color-correct) !important;
  color: #ffffff;
}

.partial {
  background-color: var(--color-partial) !important;
  color: #ffffff;
}

.notTotallyWrong {
  background-color: var(--color-not-totally-wrong) !important;
  color: #ffffff;
}

.wrong {
  background-color: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 2px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   10. MODALS, TOASTS & INTERFACE
   ========================================================================== */
@keyframes popIn {
  0% {
    transform: scale(0.97);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes toastPopIn {
  0% {
    transform: translateX(-50%) scale(0.97);
    opacity: 0;
  }
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.4s ease-in-out;
  border-color: var(--color-wrong) !important;
}

.toast-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--bg-card);
  border: 2px solid var(--color-not-totally-wrong);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  animation: toastPopIn 0.3s ease-out;
}

.win-message,
.lose-message {
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  margin-bottom: 8px;
}

.win-message {
  background: linear-gradient(135deg, #064e3b, #022c22);
  border: 2px solid var(--color-correct);
}

.win-message h2 {
  color: #34d399;
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.lose-message {
  background: linear-gradient(135deg, #7f1d1d, #450a0a);
  border: 2px solid var(--color-wrong);
}

.lose-message h2 {
  color: #f87171;
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.rules-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(4, 6, 12, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
}

.rules-content {
  position: relative;
  background-color: var(--bg-card);
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid #1e293b;
  animation: popIn 0.25s ease-out;
  max-height: 85vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.bug-modal-content {
  max-width: 450px;
  width: 90%;
  background-color: var(--bg-card);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px 24px;
}

.bug-modal-content h2 {
  margin-bottom: 16px;
  color: var(--text-main);
  font-size: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  text-align: left;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.bug-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #334155;
  background-color: var(--bg-input);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.bug-input:focus {
  border-color: #818cf8;
}

.close-modal-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.close-modal-btn:hover {
  color: var(--color-wrong);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-primary {
  background-color: var(--color-indigo);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: "Renogare", sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--color-indigo-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid #334155;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: "Renogare", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: var(--bg-input);
  color: var(--text-main);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(100%);
  background-color: var(--bg-input) !important;
  border: 1px solid #334155 !important;
}

#hint-modal .btn-primary:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  filter: grayscale(100%) !important;
  background-color: var(--bg-input) !important;
  color: var(--text-muted) !important;
  border: 1px solid #334155 !important;
  pointer-events: none;
}

/* ==========================================================================
   11. CUSTOM SYNONYMS MODAL
   ========================================================================== */
.personalized-synonyms-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--bg-card);
  border: 2px solid #334155;
  padding: 20px;
  border-radius: 12px;
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  width: 90%;
  max-width: 450px;
  box-sizing: border-box;
  opacity: 0;
  animation: modalPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalPopIn {
  0% {
    transform: translate(-50%, -50%) scale(0.97);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.personalized-synonyms-modal h3 {
  font-size: 1.2rem;
  margin-bottom: 14px;
  padding-right: 20px;
}

.personalized-synonyms-modal p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

#close-synonyms-btn {
  float: right;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 18px;
  transition: color 0.15s ease;
}

#close-synonyms-btn:hover {
  color: var(--color-wrong);
}

.personalized-synonyms-modal textarea {
  width: 100%;
  height: 100px;
  resize: none;
  background-color: var(--bg-main);
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px;
  color: var(--text-main);
  font-family: monospace;
  font-size: 0.82rem;
  margin-bottom: 14px;
  outline: none;
}

.personalized-synonyms-modal .input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.delete-syn-btn {
  background: rgba(239, 68, 68, 0);
  border: none;
  color: #f87171;
  font-size: 16px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.15s ease;
}

.delete-syn-btn:hover {
  background: var(--color-wrong);
  color: #ffffff;
  transform: scale(1.05);
}

#synonym-error-msg {
  color: var(--color-wrong);
  font-size: 0.78rem;
  font-style: italic;
  margin-bottom: 10px;
  display: none;
}

.personalized-synonyms-modal input[type="text"] {
  flex: 1;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #334155;
  background-color: var(--bg-input);
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.personalized-synonyms-modal input[type="text"]:focus {
  border-color: #818cf8;
}

#save-synonyms-btn {
  width: 100%;
  font-family: "Renogare", sans-serif;
  background-color: var(--color-indigo);
  color: #ffffff;
  border: none;
  font-size: 0.9rem;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#save-synonyms-btn:hover {
  background-color: var(--color-indigo-hover);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.mobile-scroll-help {
  display: none;
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 4px;
}

/* ==========================================================================
   12. TABLET & MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 1200px) {
  body {
    padding: 16px 4px 10px 4px;
  }

  body,
  body * {
    cursor: auto !important;
  }

  #custom-cursor {
    display: none !important;
  }

  .personalized-synonyms-modal .input-row {
    flex-direction: column;
    gap: 10px;
  }

  .personalized-synonyms-modal input[type="text"] {
    width: 100%;
  }

  #layout-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 100vw;
    padding: 0;
  }

  #main-content-column {
    max-width: 100%;
    padding: 0 2px;
    box-sizing: border-box;
  }

  #left-sidebar-column,
  #right-sidebar-column {
    margin-top: 0;
    width: 100%;
    max-width: 100%;
  }

  #game-status {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    gap: 6px;
  }

  #game-status p {
    text-align: center;
  }

  #game-status button {
    flex: 1;
    min-width: 0;
    padding: 0 6px;
  }

  #hint-btn-text,
  #personalized-btn span,
  #giveup-btn span {
    display: none;
  }

  .tries-badge {
    padding: 0 8px;
    font-size: 0.8rem;
  }

  .suggestions-box {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 200px;
    z-index: 2000;
  }

  /* On s'assure que le conteneur de jeu prend toute la largeur disponible de l'écran */
  #game-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    box-sizing: border-box;
  }

  #guesses-table {
    width: 100%;
    table-layout: auto;
  }

  #guesses-table th,
  #guesses-table td {
    padding: 8px 2px;
    font-size: 0.68rem;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .mobile-scroll-help {
    display: block;
  }

  #legal-notice,
  .rules-content,
  .disclaimer-content,
  .bug-modal-content,
  .personalized-synonyms-modal {
    max-height: 80vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .close-modal-btn {
    position: sticky !important;
    top: 0;
    float: right;
    z-index: 10;
    background: var(--bg-card);
    padding: 4px 8px;
  }
}

/* ==========================================================================
   13. HINT CARDS
   ========================================================================== */
#active-hints-container {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px;
  margin: 12px 0;
  width: 100%;
}

#active-hints-container .hint-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid #1e293b;
  border-top: 3px solid var(--color-partial);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hint-card-title {
  font-family: "Renogare", sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.hint-card-value {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--text-main);
  text-transform: capitalize;
}

.hint-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}

.hint-card-grid span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 0.72rem;
  color: var(--text-main);
  text-align: center;
  text-transform: capitalize;
}

/* ==========================================================================
   14. DISCLAIMER BANNER
   ========================================================================== */
#disclaimer-banner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 16px auto;
  padding: 12px 18px;
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.15),
    rgba(180, 83, 9, 0.25)
  );
  border: 1px solid var(--color-partial);
  border-radius: 10px;
  color: #fef3c7;
  font-size: 0.85rem;
  line-height: 1.45;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

#disclaimer-banner p {
  margin-bottom: 4px;
}

#My-Name {
  font-family: "Renogare", sans-serif;
  font-weight: bold;
  color: var(--color-indigo);
}

/* ==========================================================================
   15. RULES INDICATORS & COLORBLIND MODE
   ========================================================================== */
.rules-color-list {
  list-style: none !important;
  padding-left: 0 !important;
}

.rules-color-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.rules-color-list li strong {
  white-space: nowrap;
}

.color-box {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
}

.color-box.correct {
  background-color: var(--color-correct);
}
.color-box.partial {
  background-color: var(--color-partial);
}
.color-box.notTotallyWrong {
  background-color: var(--color-not-totally-wrong);
}
.color-box.wrong {
  background-color: var(--color-wrong);
}

body.colorblind {
  --color-correct: #56b4e9;
  --color-partial: #f0e442;
  --color-not-totally-wrong: #d55e00;
  --color-wrong: #cc79a7;
}

body.colorblind #guesses-table td.partial,
body.colorblind #guesses-table td.notTotallyWrong {
  color: #000000 !important;
  text-shadow: none !important;
}

body.colorblind #guesses-table td {
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  box-sizing: border-box;
}

body.colorblind #guesses-table td.correct {
  border-color: #56b4e9 !important;
}
body.colorblind #guesses-table td.partial {
  border-color: #f0e442 !important;
}
body.colorblind #guesses-table td.notTotallyWrong {
  border-color: #d55e00 !important;
}
body.colorblind #guesses-table td.wrong {
  border-color: #cc79a7 !important;
  background-color: rgba(204, 121, 167, 0.25) !important;
  color: #ffffff !important;
}

body.colorblind #guesses-table td::after {
  display: inline-block;
  margin-left: 6px;
  font-size: 1rem;
  font-weight: 900;
  vertical-align: middle;
}

body.colorblind #guesses-table td.correct::after {
  content: " ✓";
  color: #ffffff;
}
body.colorblind #guesses-table td.partial::after {
  content: " ~";
  color: #000000;
}
body.colorblind #guesses-table td.notTotallyWrong::after {
  content: " ≠";
  color: #000000;
}
body.colorblind #guesses-table td.wrong::after {
  content: " ✕";
  color: #ffffff;
}

/* ==========================================================================
   16. MODERN SWITCHES & CHECKBOXES
   ========================================================================== */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-input);
  border: 1.5px solid #334155;
  border-radius: 30px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 2.5px;
  background: linear-gradient(135deg, #ffffff, #e2e8f0);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.switch:hover .slider {
  border-color: #818cf8;
  transform: scale(1.05);
}

.switch:hover .slider::before {
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

input:checked + .slider {
  background: linear-gradient(
    135deg,
    var(--color-indigo),
    var(--color-indigo-hover)
  );
  border-color: #818cf8;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

input:checked + .slider::before {
  transform: translateX(19px);
  background: #ffffff;
}

input[type="checkbox"]:not(.switch input) {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--bg-input);
  border: 1.5px solid #334155;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: all 0.2s ease;
}

input[type="checkbox"]:not(.switch input):checked {
  background: var(--color-indigo);
  border-color: #818cf8;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

input[type="checkbox"]:not(.switch input):checked::after {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 11px;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ==========================================================================
   17. OPTIONS MODAL & PREVIEW
   ========================================================================== */
.option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  color: var(--text-main);
  font-size: 0.9rem;
}

.colorblind-preview .preview-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
