/* --- Versus Mode Table Consistency --- */
/* --- Versus Mode: Use Classic Mode Table Layout --- */
#versus-container {
  max-width: 900px;
  margin: 40px auto;
  border-bottom-left-radius: 8px;
}
#versus-container .table-container th:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}
#versus-container .table-container tr {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
#versus-container .table-container td {
  padding: 10px 8px;
  text-align: center;
  border: none;
  font-size: 1rem;
}
#versus-container .table-container td.icon-cell {
  background-color: #3498db;
  padding: 8px;
}
#versus-container .table-container td.icon-cell img {
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}
#versus-container .table-container td.correct {
  background-color: #27ae60;
  color: #fff;
  font-weight: bold;
}
#versus-container .table-container td.partial {
  background-color: #f1c40f;
  color: #141625;
  font-weight: bold;
}
#versus-container .table-container td.incorrect {
  background-color: #c0392b;
  color: #fff;
  font-weight: bold;
}
#versus-container .fade-cell {
  opacity: 0;
  transition: opacity 0.4s ease;
}
#versus-container .fade-cell.visible {
  opacity: 1;
}
/* === Language Selector === */
.language-selector {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 1000;
}

.language-dropdown-button {
  background-color: #22233b;
  color: #ffffff;
  border: 2px solid #3498db;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  min-width: 120px;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI Symbol', 'Android Emoji', 'EmojiSymbols', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.language-dropdown-button:hover {
  background-color: #2c2f48;
  border-color: #2980b9;
  transform: translateY(-1px);
}

.language-dropdown-button:focus {
  border-color: #f1c40f;
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.4);
}

.language-dropdown-button:after {
  content: '▼';
  font-size: 10px;
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.language-dropdown-button[aria-expanded="true"]:after {
  transform: rotate(180deg);
}

.language-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #22233b;
  border: 2px solid #3498db;
  border-radius: 8px;
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.language-dropdown-option {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI Symbol', 'Android Emoji', 'EmojiSymbols', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  font-size: 14px;
  color: #ffffff;
  display: flex;
  align-items: center;
}

.language-dropdown-option:hover {
  background-color: #2c2f48;
}

.language-dropdown-option.selected {
  background-color: #3498db;
  color: #ffffff;
}

.language-dropdown-option.selected:hover {
  background-color: #2980b9;
}

/* Legacy select styles - keep for fallback */
.language-selector select {
  background-color: #22233b;
  color: #ffffff;
  border: 2px solid #3498db;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  min-width: 120px;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI Symbol', 'Android Emoji', 'EmojiSymbols', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.language-selector select:hover {
  background-color: #2c2f48;
  border-color: #2980b9;
  transform: translateY(-1px);
}

.language-selector select:focus {
  border-color: #f1c40f;
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.4);
}

.language-selector select option {
  background-color: #22233b;
  color: #ffffff;
  padding: 8px;
  font-size: 14px;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Segoe UI Symbol', 'Android Emoji', 'EmojiSymbols', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Ensure it's visible in all modes */
#mode-selection-container .language-selector,
#classic-mode-container .language-selector,
#ability-mode-container .language-selector,
#emoji-mode-container .language-selector,
#splash-mode-container .language-selector,
#quote-mode-container .language-selector {
  display: block;
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 1000;
}

/* === end Language Selector === */

/* === CLASSIC-MODE ADDITIONS === */
#countdown-timer,
#ability-countdown-timer,
#emoji-countdown-timer,
#splash-countdown-timer,
#quote-countdown-timer {
  font-size: .9rem;
  color: #f1c40f;
  margin-bottom: 8px;
}
#streak-banner,
#ability-streak-banner,
#emoji-streak-banner,
#splash-streak-banner,
#quote-streak-banner {
  margin-bottom: 12px;
}
#streak-banner a,
#ability-streak-banner a,
#emoji-streak-banner a,
#splash-streak-banner a,
#quote-streak-banner a {
  color: #27ae60;
  text-decoration: none;
  font-weight: bold;
}
.clue-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

/* Locked clue button styles */
.clue-buttons button {
  padding: 16px 28px;
  font-size: 18px;
  min-width: 150px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.clue-buttons button.locked {
  background-color: #2c3e50 !important;
  color: #7f8c8d !important;
  cursor: not-allowed !important;
  opacity: 0.6;
  border: 2px solid #34495e;
  transition: none;
}

.clue-buttons button.locked:hover {
  background-color: #2c3e50 !important;
  color: #7f8c8d !important;
  transform: none;
}

.clue-buttons button:not(.locked) {
  background-color: #3498db;
  color: #ffffff;
  border: 2px solid #2980b9;
  transition: all 0.3s;
}

.clue-buttons button:not(.locked):hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

/* Subtitle styling for clue buttons */
.clue-buttons button .button-subtitle {
  font-size: 12px;
  font-weight: normal;
  opacity: 0.8;
  margin-top: 2px;
  line-height: 1.2;
}

.clue-display {
  margin-top: 8px;
  font-style: italic;
  color: #f1c40f;
}
#share-panel {
  display: none;
  margin-top: 12px;
  text-align: center;
}
#share-panel p {
  font-weight: bold;
  margin-bottom: 6px;
}
#share-panel .share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,24px);
  gap: 4px;
  justify-content: center;
  margin-bottom: 8px;
}
#share-panel .share-grid .cell {
  width: 24px; height: 24px; border-radius: 4px; background: #444;
}
#share-panel .share-grid .cell.correct { background: #27ae60; }
#share-panel .share-grid .cell.incorrect { background: #c0392b; }
#share-panel button {
  margin: 0 6px;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.autocomplete-list li.highlight {
  background: #3498db;
  color: #ffffff;
}

/* === end Classic-mode additions === */

body {
  font-family: 'Poppins', sans-serif;
  /* Background will be set dynamically by summer-background.js */
  background-size: cover;
  color: #ffffff;
  text-align: center;
  margin: 0;
  padding: 20px;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: -1;
}

.container {
  max-width: 900px;
  margin: auto;
  background: transparent;
  padding: 20px;
  border-radius: 15px;
  box-shadow: none;
}

.mode-title {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #3498db;
}

.mode-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

button {
  padding: 12px 24px;
  cursor: pointer;
  background-color: #3498db;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s;
  margin: 5px;
}

button:hover {
  background-color: #2980b9;
}

input {
  padding: 12px;
  border: 2px solid #3498db;
  border-radius: 8px;
  font-size: 16px;
  text-align: center;
  outline: none;
  background-color: #22233b;
  color: white;
  width: 100%;
}

.autocomplete-container {
  position: relative;
  display: inline-block;
  width: 300px;
  margin: 10px auto;
}

.autocomplete-list {
  list-style: none;
  background: #2c2f48;
  border: 1px solid #3498db;
  border-radius: 8px;
  margin: 0;
  padding: 0;
  position: absolute;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
}

.autocomplete-list li {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.autocomplete-list li:hover {
  background: #3498db;
  color: #ffffff;
}

.autocomplete-list img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 10px;
}

.emoji-container {
  font-size: 2rem;
  margin: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ✅ UPDATED: Victory screen cleaned up */
.victory-screen {
  display: none;
  padding: 20px;
  border-radius: 12px;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* ✅ NEW: green text only for the "VICTORY!" header */
.victory-screen h1,
#ability-victory-title,
#quote-victory-screen h1 {
  color: #27ae60;
}

/* === Splash Mode Share Button & Panel === */
/* === Splash Mode Share Button & Panel (Updated) === */
#splash-victory-share-panel {
  display: none;
}
#splash-share-btn {
  display: inline-block;
  margin: 0 6px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background-color: #3498db;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}
#splash-share-btn:hover {
  background-color: #2980b9;
}
/* Removed: splash-victory-share-panel button style, not used anymore */
/* Remove grid and green blocks above share button */
#splash-victory-share-panel p {
  display: none !important;
}


/* Victory screen mode selector grid layout */
.mode-switch-buttons.victory-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.victory-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 18px;
}

.victory-mode-btn {
  min-width: 160px;
  max-width: 220px;
  height: 48px;
  padding: 0 18px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: #3498db;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.victory-mode-btn:hover {
  background: #2980b9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transform: translateY(-2px);
}

.splash-image-box {
  max-width: 400px;
  height: 250px;
  margin: auto;
  overflow: hidden;
  border-radius: 12px;
  
  display: flex;
  justify-content: center;
  align-items: center;
  background: #22233b;
}

#splash-image {
  transition: transform 0.3s ease;
  max-width: 100%;
  -webkit-user-drag: none;
  -moz-user-drag: none;
  -ms-user-drag: none;
  pointer-events: none;
  user-select: none;
}

.ability-image {
  max-width: 300px;
  margin: 20px auto;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: block;
  text-align: center;
}

/* Container for ability image to ensure proper centering */
#ability-mode-container {
  text-align: center;
}

.immortal-mode {
  filter: grayscale(100%);
  transform: rotate(115deg);
}

.loldle-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 2px solid #3498db;
}

.loldle-hero-text p {
  margin: 6px 0;
}

/* Feedback Colors */
td.correct {
  background-color: #27ae60;
  font-weight: bold;
  color: #ffffff;
}
td.partial {
  background-color: #f1c40f;
  font-weight: bold;
  color: #141625;
}
td.incorrect {
  background-color: #c0392b;
  font-weight: bold;
  color: #ffffff;
}

/* Modal and Help Button */
.container {
  position: relative;
}
#how-to-play-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: 2px solid #3498db;
  border-radius: 50%;
  color: #3498db;
  width: 36px;
  height: 36px;
  font-size: 24px;
  line-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-content {
  background: rgba(30, 31, 54, 0.85);
  color: #ffffff;
  padding: 16px;
  border-radius: 16px;
  max-width: 400px;
  max-height: 80%;
  overflow-y: auto;
  text-align: left;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.modal-content h2 {
  text-align: center;
  margin-top: 0;
}
.modal-content p {
  margin-bottom: 15px;
}
.close-button {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}
.close-button:hover {
  color: #3498db;
}

/* Shake animation for wrong input/guess feedback */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}
.shake {
  animation: shake 0.5s;
}

/* Table container for Classic mode guesses */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 20px;
}

/* Classic mode table headers blue container */
.table-container table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
}

.table-container table thead {
  background-color: #3498db;
  border-radius: 8px;
}

.table-container table thead tr {
  background-color: transparent;
}

.table-container table th {
  padding: 12px 8px;
  text-align: center;
  font-weight: bold;
  color: #ffffff;
  border: none;
  font-size: 14px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.table-container table th:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.table-container table th:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.table-container table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-container table tbody td {
  padding: 10px 8px;
  text-align: center;
  border: none;
}

/* Hero icon cell with blue background like header */
.table-container table tbody td.icon-cell {
  background-color: #3498db;
  padding: 8px;
}

.table-container table tbody td.icon-cell img {
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .table-container {
    overflow-x: visible;
  }
}


/* === Splash Bonus Quiz === */
#splash-skin-quiz {
  margin-top: 15px;
  text-align: center;
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
}

#splash-skin-quiz h3 {
  color: #ffffff;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

#splash-skin-quiz .autocomplete-container {
  position: relative;
  display: inline-block;
  width: 300px;
  margin: 10px auto;
}

#splash-skin-quiz input {
  background-color: #181a24;
  color: #ffffff;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 12px;
  font-size: 16px;
  text-align: center;
  outline: none;
  width: 100%;
}

#splash-skin-quiz button {
  background-color: #23263a;
  color: #ffffff;
  border: 1px solid #444;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s;
  padding: 12px 24px;
  cursor: pointer;
  margin: 5px;
}

#splash-skin-quiz button:hover {
  background-color: #2980b9;
}

#splash-skin-result.correct {
  color: #27ae60;
  font-weight: bold;
}

#splash-skin-result.incorrect {
  color: #c0392b;
  font-weight: bold;
}

/* === Splash-skin autocomplete === */
#splash-skin-autocomplete-list {
  list-style: none;
  background-color: #2c2f48;
  border: 1px solid #3498db;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  position: absolute;
  width: 100%;
  z-index: 100;
  margin: 0;
  padding: 0;
}

#splash-skin-autocomplete-list li {
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

#splash-skin-autocomplete-list li:hover {
  background-color: #3498db;
  color: #ffffff;
}
/* === Classic detail panels fade-in === */
.fade-cell {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.fade-cell.visible {
  opacity: 1;
}


/* Hide Classic victory overlay by default */
#victory-screen { display: none; }

/* === Ability Mode: remove border from victory overlay === */
#ability-victory-screen {
  border: none !important;
}

/* === Mode Button Icons === */
.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mode-buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  width: 300px;
  height: 60px;
  background-image: url('images/ui/quadrato.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.mode-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  filter: brightness(1.1);
}

.mode-buttons button img.icon {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.8));
}

/* === end Mode Button Icons === */

/* === Enhanced Guess History Styles === */
.guess-history {
  list-style: none;
  margin: 20px 0;
  padding: 0;
  text-align: center;
}

.guess-history li {
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.correct-guess {
  background-color: #27ae60;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.incorrect-guess {
  background-color: #c0392b;
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

/* Mode titles styling - make all mode h2 titles blue */
#classic-mode-container h2,
#quote-mode-container h2,
#ability-mode-container h2,
#emoji-mode-container h2,
#splash-mode-container h2 {
  color: #3498db;
  font-size: 2rem;
  margin-bottom: 20px;
  font-weight: bold;
}

/* Quote text styling with quotation marks */
.quote-text {
  font-size: 1.2rem;
  font-style: italic;
  color: #f1c40f;
  margin: 20px 0;
  padding: 15px;
  text-align: center;
  line-height: 1.4;
}

.quote-text::before {
  content: '"';
  font-size: 1.5em;
  color: #3498db;
  margin-right: 0.1em;
}

.quote-text::after {
  content: '"';
  font-size: 1.5em;
  color: #3498db;
  margin-left: 0.1em;
}

/* Quote mode specific clue button styling */
#quote-mode-container .clue-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 15px;
  margin-bottom: 20px;
}

#quote-mode-container .clue-buttons button {
  min-width: 140px;
  padding: 10px 20px !important;
  font-size: 14px !important;
}

#quote-back-to-mode-selection {
  background-color: #3498db !important;
  color: #ffffff !important;
  border: 2px solid #2980b9 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  min-width: 160px !important;
}

#quote-back-to-mode-selection:hover {
  background-color: #2980b9 !important;
  transform: translateY(-2px) !important;
}

/* === Accessibility Improvements === */

/* 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;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background-color: #3498db;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .correct-guess {
    background-color: #000000 !important;
    color: #00ff00 !important;
    border: 2px solid #00ff00 !important;
  }
  
  .incorrect-guess {
    background-color: #000000 !important;
    color: #ff0000 !important;
    border: 2px solid #ff0000 !important;
  }
  
  .table td.green {
    background-color: #000000 !important;
    color: #00ff00 !important;
    border: 2px solid #00ff00 !important;
  }
  
  .table td.red {
    background-color: #000000 !important;
    color: #ff0000 !important;
    border: 2px solid #ff0000 !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .shake {
    animation: none !important;
  }
}

/* Dark mode media query support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #b8c5d1;
    --accent-color: #3498db;
  }
}

/* Focus indicators for keyboard navigation */
button:focus,
input:focus,
select:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

/* Skip link styling */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #3498db;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Performance optimizations */
.lazy-image {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.lazy-image.loaded {
  opacity: 1;
}

/* Image loading states */
.image-placeholder {
  background-color: #f0f0f0;
  background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === VERSUS MODE STYLES === */
.beta-badge {
  background-color: #e74c3c;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 5px;
  font-weight: bold;
}

.versus-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
  max-width: 800px;
}

.versus-option-card {
  background-color: #2c2f48;
  border: 2px solid #3498db;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.versus-option-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.versus-option-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  transition: all 0.3s ease;
}

.versus-option-btn:hover {
  color: #3498db;
}

.versus-icon {
  width: 48px;
  height: 48px;
  filter: brightness(0) invert(1);
}

.versus-option-desc {
  color: #bdc3c7;
  font-size: 14px;
  margin-top: 10px;
}

.versus-screen {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.game-settings {
  background-color: #2c2f48;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.game-settings label {
  display: block;
  color: #ffffff;
  font-weight: bold;
  margin-bottom: 5px;
  margin-top: 15px;
}

.game-settings label:first-child {
  margin-top: 0;
}

.game-settings input,
.game-settings select {
  width: 100%;
  padding: 12px;
  border: 2px solid #3498db;
  border-radius: 8px;
  background-color: #22233b;
  color: #ffffff;
  font-size: 16px;
  transition: all 0.3s ease;
}

.game-settings input:focus,
.game-settings select:focus {
  outline: none;
  border-color: #f1c40f;
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.4);
}

.versus-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.versus-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.versus-btn.primary {
  background-color: #27ae60;
  color: white;
}

.versus-btn.primary:hover {
  background-color: #219a52;
  transform: translateY(-1px);
}

.versus-btn.primary:disabled {
  background-color: #7f8c8d;
  cursor: not-allowed;
  transform: none;
}

.versus-btn.secondary {
  background-color: #e74c3c;
  color: white;
}

.versus-btn.secondary:hover {
  background-color: #c0392b;
  transform: translateY(-1px);
}

.lobby-players {
  background-color: #2c2f48;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.lobby-players h4 {
  color: #ffffff;
  margin-bottom: 15px;
}

.player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background-color: #22233b;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 2px solid transparent;
}

.player-item.host {
  border-color: #f1c40f;
}

.player-name {
  color: #ffffff;
  font-weight: bold;
}

.host-badge {
  background-color: #f1c40f;
  color: #22233b;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.lobby-status {
  text-align: center;
  margin: 20px 0;
}

.lobby-status p {
  color: #bdc3c7;
  font-size: 16px;
}

.versus-game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 20px;
  background-color: #2c2f48;
  border-radius: 12px;
}

.versus-timer {
  font-size: 48px;
  font-weight: bold;
  color: #e74c3c;
  text-align: center;
  min-width: 80px;
}

.versus-players-status {
  display: flex;
  gap: 15px;
}

.player-status {
  background-color: #22233b;
  padding: 10px 15px;
  border-radius: 8px;
  text-align: center;
}

.player-status .player-name {
  display: block;
  color: #ffffff;
  font-weight: bold;
  margin-bottom: 5px;
}

.player-status .player-score {
  color: #27ae60;
  font-size: 18px;
  font-weight: bold;
}

.versus-hero-info {
  text-align: center;
  margin: 20px 0;
}

.versus-hero-info h3 {
  color: #ffffff;
  margin-bottom: 10px;
}

.versus-hero-info p {
  color: #bdc3c7;
}

.versus-game-content {
  max-width: 800px;
  margin: 0 auto;
}

.versus-score-board {
  background-color: #2c2f48;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.versus-score-board h4 {
  color: #ffffff;
  margin-bottom: 15px;
  text-align: center;
}

.score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #22233b;
  border-radius: 8px;
  margin-bottom: 10px;
}

.score-item .player-name {
  color: #ffffff;
  font-weight: bold;
}

.score-item .score {
  color: #27ae60;
  font-size: 18px;
  font-weight: bold;
}

.versus-match-history {
  background-color: #2c2f48;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.versus-match-history h4 {
  color: #ffffff;
  margin-bottom: 15px;
}

.versus-match-history p {
  color: #bdc3c7;
  text-align: center;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: #22233b;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 2px solid transparent;
}

.result-row.winner {
  border-color: #f1c40f;
  background-color: #2c2f48;
}

.result-row .position {
  font-size: 24px;
  font-weight: bold;
  color: #f1c40f;
  min-width: 40px;
}

.result-row .player-name {
  color: #ffffff;
  font-weight: bold;
  flex-grow: 1;
  text-align: left;
  margin-left: 20px;
}

.result-row .score {
  color: #27ae60;
  font-size: 18px;
  font-weight: bold;
}

/* Responsive design for versus mode */
@media (max-width: 768px) {
  .versus-menu {
    grid-template-columns: 1fr;
  }
  
  .versus-buttons {
    flex-direction: column;
  }
  
  .versus-game-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .versus-players-status {
    flex-direction: column;
    width: 100%;
  }
  
  .versus-timer {
    font-size: 36px;
  }
}

/* Animation for countdown */
@keyframes countdown-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

#versus-countdown {
  animation: countdown-pulse 1s infinite;
}

/* Shake animation for invalid inputs */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s;
}
