@font-face {
  font-display: swap; 
  font-family: 'Lusitana';
  font-style: normal;
  font-weight: 400;
  src: url('/assets/fonts/lusitana-v14-latin-regular.woff2') format('woff2');
}

::selection {
  background: #780606;
  color: white;
}

::-moz-selection {
  background: #780606;
  color: white;
}

body {
  margin: 0;
  font-family: "Lusitana", serif;
  color: white;
  background: black;
  overflow-x: hidden;
  overflow-y: hidden;
}

#background {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges; 
  image-rendering: -webkit-optimize-contrast; 
  -ms-interpolation-mode: nearest-neighbor; 
}

/* Vertical Stack */
#game {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  gap: 16px;
  position: relative;
}

#header {
  position: relative;
  text-align: center;
}

#header img {
  width: 50%;
  position: relative;
  z-index: 100;
}

.header-title-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Boss-text Mask */
.boss-mask {
  background: white;
  color: black;
  padding: 0 6px;
}

/* Rant Box */
#rant-box {
  width: 436px;
  max-width: 436px;
  height: 227px;
  top: 0px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background-image: url('../assets/ui/border_box.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border: none;
  image-rendering: pixelated;
}

.rant-header {
  min-width: 364px;
  position: absolute;
  align-items: center;
  top: -8px;
  border: none;
  font-weight: bold;
  background-image: radial-gradient(ellipse 55% 45%, black, rgba(0,0,0,0));
}

#rant-box .rant-text {
  margin-top: 8px;
  padding: 14px;
  font-size: 18px;
  line-height: 1.4;
  color: white;
}

/* Search Bar */
.search-wrapper {
  position: relative;
  top: -10px;
  width: 420px;
  background-image: url('../assets/ui/border_search.webp');
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  padding: 12px;
  display: flex;
  align-items: center;
}

#search-bar input {
  flex: 1;
  padding: 10px 16px;
  font-size: 16px;
  background: transparent;
  border: none;
  color: white;
  text-align: left;
  font-family: "Lusitana", serif;
}

#search-bar input:focus {
  outline: none;
}

#search-bar input::placeholder {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Lusitana", serif;
  letter-spacing: 2px;
}

#search-bar .enter-btn {
  width: 40px;
  height: 40px;
  position: relative;
  right: 12px;
  background-image: url('../assets/ui/btn_enter.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  opacity: 25%;
  border: none;
  outline: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  flex-shrink: 0;
}

#search-bar .enter-btn:hover {
  transform: scale(1.02);
  opacity: 50%;
  filter: brightness(1.2);
}

#suggestions {
  position: absolute;
  top: 100%;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 60;
}

#suggestions li {
  padding: 8px 12px;
  cursor: pointer;
  background-color: rgba(5, 5, 5, 0.85);
  width: 360px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#suggestions li.highlighted {
  background-image: linear-gradient(to bottom, black, rgb(48, 48, 48));
  width: 360px;
}

.hidden {
  display: none;
}

/* Guess Log */
#guess-log {
  position: fixed;
  top: 500px;
  width: 100%;
  max-width: 480px;
  font-size: 14px;
  color: rgb(155, 155, 155);
  letter-spacing: 0.5px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#guess-log .guess-container {
  max-height: 180px;
  overflow-y: auto;
  color: white;
}

#guess-log .guess-container::-webkit-scrollbar {
  width: 8px;
}

#guess-log .guess-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

#guess-log .guess-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
}

#guess-log .guess-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.7);
}

.guess-header,
.guess-row {
  display: grid;
  grid-template-columns: 1.1fr 2fr 1.5fr;
  padding-left: 10px;
  padding-right: 10px;
}

.guess-header {
  font-size: 16px;
  font-weight: normal;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.match {
  background: rgba(255, 0, 0, 0.6);
}

.no-match {
  background: rgba(0, 0, 0, 0.6);
}

/* Player HUD */
#player-hud {
  position: fixed;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  z-index: 60;
  pointer-events: none;
}

#player-hud-info {
  text-align: right;
  font-weight: bold;
  font-size: 16px;
  color: white;
  letter-spacing: 1px;
  display: none;
  z-index: 60;
}

.button-stack {
  position: relative;
  right: -280%;
  gap: 8px;
  align-items: flex-end;
  z-index: 60;
  pointer-events: auto;
}

#heal-btn {
  width: 82px;
  height: 82px;
  background-image: url('../assets/ui/btn_heal.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  padding: 0;
  z-index: 60;
  position: relative;
}

#heal-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

#heal-btn:focus {
  outline: none;
}

#heal-counter {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  background: black;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Courier New", serif;
  font-size: 16px;
  color: white;
}

.dodge-buttons {
  display: flex;
  width: 82px;
  height: 82px;
  background-image: url('../assets/ui/btn_dodge.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 60;
}

.dodge-buttons :focus {
  outline: none;
}

.dodge-buttons:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

#dodge-left-btn,
#dodge-right-btn {
  width: 41px; 
  height: 82px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  padding: 0;
}

/* Boss and Player Health Bars */
#boss-health {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
}

#boss-health .health-label {
  position: relative;
  left: -40%;
  font-size: 14px;
  letter-spacing: 2px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.boss-health-bar {
  width: 466px;
  height: 20.4px;
  background-size: 466px auto;
  background-image: url('../assets/ui/hp_boss.webp');
  background-repeat: no-repeat;
  background-position: 0 0;
  image-rendering: pixelated;
}

#player-health {
  position: fixed;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 0px;
  z-index: 20;
}

.player-health-bar {
  position: relative;
  left: -50%;
  width: 244px;
  height: 17.5px;
  background-size: 244px auto;
  background-image: url('../assets/ui/hp_player.webp');
  background-repeat: no-repeat;
  background-position: 0 0;
  image-rendering: pixelated;
}

#player-health .health-label {
  position: relative;
  left: -48%;
  bottom: 0px;
  font-size: 14px;
  letter-spacing: 2px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Rules Modal */
#rules-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: black;
  border: 1px solid white;
  color: white;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
}

#rules-btn:hover {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#rules-modal {
  position: fixed;
  z-index: 110;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(5px);
  display: none; /* hidden by default; toggled via .hidden class */
  align-items: center;
  justify-content: center;
}

/* Show modal when it does NOT have the .hidden class */
#rules-modal:not(.hidden) {
  display: flex;
}

/* Boss Index Modal Styles */
.boss-index-modal {
  display: flex !important;
  flex-direction: column;
  width: 90%;
  max-width: 900px;
  height: 95vh;
  max-height: 95vh;
  border-radius: 8px;
  padding: 20px;
  top: 24px;
  position: relative;
  overflow: hidden;
}

.modal-back-btn {
  position: absolute;
  top: 0px;
  right: 22%;
  background: transparent;
  border: none;
  color: white;
  padding: 8px 12px;
  font-family: "Lusitana", serif;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  z-index: 120;
}

.modal-back-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.modal-gameplay-info {
  margin-top: -12px;
  margin-bottom: 48px;
  max-height: 140px;
  overflow-y: none;
  font-size: 16px;
  font-weight: normal;
  line-height: 0.8;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-gameplay-info h2 {
  margin: 0 0 8px 0;
  font-size: 20px;
  line-height: 22px;
  text-align: center;
}

.modal-gameplay-info p {
  margin: 4px 0;
  text-align: left;
  width: 400px;
}

.boss-index-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.boss-index-header {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 12px;
  color: #d4af37;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.boss-games-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.boss-games-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.boss-game-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: white;
  font-family: "Lusitana", serif;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.boss-game-btn:hover {
  background: rgba(32, 32, 32, 0.9);
  box-shadow: 0 0 12px rgba(32, 32, 32, 0.9);
}

.boss-game-btn.selected {
  background: rgba(212, 175, 55, 0.25);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
  color: #ffd700;
}

.boss-content-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.boss-list-wrapper {
  width: 90%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 4px;
  background: rgba(20, 20, 20, 0.6);
  overflow: hidden;
  height: 190px;
}

.boss-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  max-height: 190px;
}

.boss-list::-webkit-scrollbar {
  width: 8px;
}

.boss-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
}

.boss-list::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.4);
}

.boss-list::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.7);
}

.boss-list-item {
  padding: 8px 8px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  color: white;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.boss-list-item:hover {
  background: rgba(212, 175, 55, 0.1);
}

.boss-list-item.selected {
  background: rgba(212, 175, 55, 0.3);
  box-shadow: inset 0 0 8px rgba(212, 175, 55, 0.5);
  color: #ffd700;
}

.boss-list-item.coming-soon {
  cursor: default;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-style: italic;
}

.boss-list-item.coming-soon:hover {
  background: transparent;
}

.boss-display-container {
  width: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 4px;
  overflow: hidden;
  min-height: 250px;
}

.boss-display-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  -ms-interpolation-mode: nearest-neighbor;
}

.modal-disclaimer {
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  padding: 8px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  line-height: 1.3;
  max-height: 100px;
  max-width: 420px;
  margin: 12px auto 12px auto;
  overflow-y: hidden;
}

/* Death Overlay */
#death-overlay {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 90;
}

#death-overlay:not(.hidden) {
  display: flex;
}

#death-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.33);
  z-index: -1;
}

#death-overlay .death-bar {
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, rgba(0,0,0,0), rgb(0, 0, 0), rgba(0,0,0,0));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#death-overlay .death-text {
  font-family: "Lusitana", serif;
  font-size: 72px;
  font-weight: bold;
  color: red;
  letter-spacing: 4px;
  z-index: 1;
}

.hidden {
  display: none;
}

/* Mobile */
@media (max-width: 600px) {
  #rant-box {
    font-size: 14px;
  }
}

/* Boss Reveal */
.boss-reveal {
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

.boss-reveal h2 {
  color: crimson;
  letter-spacing: 2px;
}

.boss-reveal a {
  display: block;
  margin: 12px 0;
}

.boss-reveal-image {
  width: 100%;
  height: 216px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: -1;
}

.boss-reveal-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  overflow: clip;
}

.boss-identified-section {
  position: relative;
  top: -10px;
  width: 420px;
  background-image: url('../assets/ui/border_search.webp');
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  padding: 12px;
  display: flex;
  align-items: center;
}

.boss-identified-text {
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #d4af37;
  position: relative;
  left: 30%;
  text-align: center;
  font-family: "Lusitana", serif;
}

.enter-button-glow {
  width: 40px;
  height: 40px;
  position: relative;
  left: 46%;
  background-image: url('../assets/ui/btn_enter.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  opacity: 25%;
  border: none;
  outline: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  flex-shrink: 0;
}

.enter-button-glow:hover {
  transform: scale(1.02);
  opacity: 50%;
  filter: brightness(1.2);
}

.rant-source-link {
  position: relative;
  top: -10px;
  text-align: center;
}

.rant-source-link a {
  color: #d4af37;
  text-decoration: none;
  transition: all 0.3s ease;
}

.rant-source-link a:hover {
  color: white;
  border-bottom-color: white;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* COMBAT SPRITES AND ZONES */
#combat-zones {
  position: fixed;
  display: flex;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  max-width: 500px;
  height: 200px;
  pointer-events: all;
  z-index: 50;
}

#combat-zone-left,
#combat-zone-center,
#combat-zone-right {
  flex: 1;
  cursor: pointer;
}

/* Base sprite styling */
.sprite {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* PLAYER SPRITE */
#player-sprite {
  position: fixed;
  bottom: 20px; /* Distance from bottom of screen */
  width: 256px;
  height: 256px;
  background-image: url('../assets/sprites/PlayerSprite.webp');
  /* Set background size to contain the entire sprite sheet (6 columns x 3 rows of 128x128 frames) */
  background-size: 600% 300%; /* 6 frames wide (600%) x 3 rows tall (300%) */
  background-repeat: no-repeat;
  transition: left 0.3s ease-out, right 0.3s ease-out, transform 0.3s ease-out;
  image-rendering: pixelated;
}

/* Player sprite zone positioning */
#player-sprite.zone-left {
  left: min(50%, calc(50% - 150px));
  transform: translateX(-50%);
}

#player-sprite.zone-center {
  left: 50%;
  transform: translateX(-50%);
}

#player-sprite.zone-right {
  left: max(50%, calc(50% + 150px));
  transform: translateX(-50%);
}

/* DRAGON SPRITE */
#dragon-sprite {
  top: 50px;
  width: 256px;
  height: 256px;
  background-image: url('../assets/sprites/DragonSprite.webp');
  background-size: 600% 500%; 
  background-repeat: no-repeat;
  transition: left 0.3s ease-out, right 0.3s ease-out, transform 0.3s ease-out;
  image-rendering: pixelated;
}

/* Dragon sprite states */
#dragon-sprite.state-inactive {
  opacity: 0;
  pointer-events: none;
}

#dragon-sprite.state-spawn {
  animation: dragon-spawn 0.5s ease-out forwards;
}

#dragon-sprite.state-despawn {
  animation: dragon-despawn 0.5s ease-in forwards;
}

/* DRAGON FX SPRITE */
#dragon-fx-sprite {
  position: fixed;
  bottom: 40px;
  width: 256px;
  height: 640px;
  background-image: url('../assets/sprites/DragonFXSprite.webp');
  background-size: 600% 300%; /* 6 frames wide x 3 rows tall */
  background-repeat: no-repeat;
  background-position: center;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 50;
}

/* FX sprite zone positioning */
#dragon-fx-sprite.zone-left {
  bottom: 20px;
  left: 25%;
  transform: translateX(-25%);
}

#dragon-fx-sprite.zone-center {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

#dragon-fx-sprite.zone-right {
  bottom: 20px;
  right: 25%;
  transform: translateX(25%);
}

/* BATTLE RESULTS SCREEN */
#battle-results {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  overflow-y: auto;
}

#battle-results.hidden {
  display: none;
}

.results-overlay {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 40px 20px;
  max-width: 800px;
  width: 100%;
}

/* Scroll background image */
.results-scroll {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}

/* Translucent content box overlay on scroll */
.results-content {
  position: relative;
  z-index: 2;
  background: rgba(16, 11, 20, 0.54);
  border: 2px solid rgba(113, 110, 130, 0.8);
  border-radius: 8px;
  padding: 32px 24px;
  width: 100%;
  max-width: 360px;
  backdrop-filter: blur(5px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Battle Results header */
.results-header {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.8);
  margin: -20px 0 10px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Boss attempts list wrapper - contains both scrollable content and custom scrollbar */
.results-boss-list-wrapper {
  position: relative;
  margin-bottom: 24px;
  max-height: 300px;
}

/* Boss attempts list container - scrollable content */
.results-boss-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: scroll;
  padding-right: 14px; /* Space for custom scrollbar */
  
  /* Hide native scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.results-boss-list::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Edge */
}

/* Custom scrollbar track */
.custom-scrollbar {
  position: absolute;
  right: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: rgba(28, 28, 36, 0.4);
  border-radius: 3px;
  pointer-events: all;
}

/* Custom scrollbar thumb */
.custom-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(56, 55, 75, 0.6);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s ease;
  pointer-events: all;
}

.custom-scrollbar-thumb:hover {
  background: rgba(113, 110, 130, 0.6);
}

.custom-scrollbar-thumb:active {
  background: rgba(113, 110, 130, 0.8);
}

/* Individual boss result row */
.result-row {
  display: grid;
  grid-template-columns: 40px 1fr 80px;
  gap: 12px;
  align-items: center;
  padding: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-left: 4px solid #555;
  border-radius: 4px;
  transition: all 0.3s ease;
}

/* Glow effects for rows based on performance */

/* Perfect guess - 1 try - bright yellow glow */
.result-row.result-row-perfect {
  border-left: 4px solid #d4af37;
  box-shadow: inset 0 0 12px rgba(212, 175, 55, 0.6), 0 0 8px rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.1);
}

/* Multiple tries - faint red glow */
.result-row.result-row-multiple {
  border-left: 4px solid #cc4444;
  box-shadow: inset 0 0 8px rgba(204, 68, 68, 0.4), 0 0 6px rgba(204, 68, 68, 0.2);
  background: rgba(204, 68, 68, 0.08);
}

/* Lost boss - dim purple glow */
.result-row.result-row-lost {
  border-left: 4px solid #7d5a99;
  box-shadow: inset 0 0 8px rgba(125, 90, 153, 0.3), 0 0 6px rgba(125, 90, 153, 0.15);
  background: rgba(125, 90, 153, 0.06);
}

/* External link icon */
.result-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  transition: all 0.3s ease;
  background: rgba(164, 164, 164, 0.1);
  border: 1px solid rgba(164, 164, 164, 0.3);
  cursor: pointer;
}

.result-link-icon:hover {
  background: rgba(164, 164, 164, 0.3);
  border-color: rgba(212, 212, 212, 0.6);
  transform: scale(1.1);
}

.result-link-icon img {
  width: 20px;
  height: 20px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.result-link-icon:hover img {
  opacity: 1;
}

/* Boss name text */
.result-boss-name {
  font-size: 18px;
  font-weight: 600;
  color: #e8dcc8;
  text-align: left;
  word-break: break-word;
}

/* Tries/Lost text */
.result-tries {
  font-size: 14px;
  color: #b8a085;
  text-align: right;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Score display box */
.results-score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(20, 15, 10, 0.6);
  border: 2px solid #555;
  border-radius: 8px;
  min-height: 100px;
  margin-top: 12px;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

/* Rank 1 - Gold yellow glow (Perfect score 10) */
.results-score-box.score-rank-1 {
  border-color: #d4af37;
  box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.3), 0 0 20px rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.15);
}

/* Rank 2 - Red glow (Score 6-9) */
.results-score-box.score-rank-2 {
  border-color: #cc4444;
  box-shadow: inset 0 0 16px rgba(204, 68, 68, 0.3), 0 0 16px rgba(204, 68, 68, 0.4);
  background: rgba(204, 68, 68, 0.1);
}

/* Rank 3 - Faint white glow (Score 5) */
.results-score-box.score-rank-3 {
  border-color: #cccccc;
  box-shadow: inset 0 0 12px rgba(200, 200, 200, 0.2), 0 0 12px rgba(200, 200, 200, 0.25);
  background: rgba(200, 200, 200, 0.05);
}

/* Rank 4 - Dim purple glow (Lost) */
.results-score-box.score-rank-4 {
  border-color: #7d5a99;
  box-shadow: inset 0 0 12px rgba(125, 90, 153, 0.2), 0 0 12px rgba(125, 90, 153, 0.2);
  background: rgba(125, 90, 153, 0.08);
}

.results-score-value {
  font-size: 48px;
  font-weight: bold;
  color: #d4af37;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.results-score-label {
  font-size: 16px;
  color: #b8a085;
  letter-spacing: 2px;
  margin-top: 8px;
  text-transform: uppercase;
}

/* Timer display for next battle */
.results-timer {
  position: relative;
  z-index: 3;
  text-align: center;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: -10px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  #rant-box {
    width: 349px; /* 80% of 436px */
    max-width: 349px;
    height: 182px; /* 80% of 227px */
  }

  .search-wrapper {
    width: 336px; /* 80% of 420px */
  }

  .boss-health-bar {
    width: 372.8px; /* 80% of 466px */
    height: 16.32px; /* 80% of 20.4px */
    background-size: 373px auto;
  }

  .player-health-bar {
    width: 195.2px; /* 80% of 244px */
    height: 14px; /* 80% of 17.5px */
    background-size: 195.2px auto;
    left: -42%; /* Pushed further left from -50% */
  }

  .rant-header {
    min-width: 291px; /* 80% of 364px */
    font-size: 14px;
  }

  #rant-box .rant-text {
    padding: 10px;
    font-size: 14px; /* Reduced from 18px */
    line-height: 1.3;
  }

  .boss-reveal-image {
    width: 92%;
    height: 182px;
  }

  #search-bar .enter-btn {
    width: 32px; /* 80% of 40px */
    height: 32px;
    right: 10px;
  }

  #search-bar input {
    font-size: 14px; 
    padding: 8px 12px;
  }

  #suggestions li {
    width: 288px;
  }

  #suggestions li.highlighted {
    width: 288px;
  }

  #guess-log {
    top: 400px;
    max-width: 336px;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  }

  .button-stack {
    right: -180%; /* Pushed further right from -320% */
  }

  .boss-identified-section {
    width: 336px; /* 80% of 420px */
    top: -9px; /* Adjusted from -10px */
  }
  
  .boss-identified-text {
    left: 25%; /* Adjusted from 30% */
  }

  .enter-button-glow {
    width: 32px; /* 80% of 40px */
    height: 32px;
    right: 10px;
    left: 37%; /* Adjusted from 46% */
  }

  .rant-source-link {
    top: -12px;
    font-size: 12px;
  }

  .modal-back-btn {
    top: -12px;
    right: 4%;
  }

  .modal-gameplay-info p {
    width: 400px;
    margin-left: 20%;
  }

  .boss-game-btn {
    width: 80px;
    padding: 2px;
    font-size: 12px;
    font-weight: normal;
    gap: 2px;
  }

  .boss-list-wrapper {
    width: 98%;
  }
  .boss-display-container {
    width: 98%;
    min-height: 114px;
  }

  .modal-disclaimer {
    margin: 12px auto 24px auto;
  }

  #combat-zones {
  position: fixed;
  display: flex;
  left: 0%;
  transform: translateX(0%);
  bottom: 0;
  width: 100%;
  height: 200px;
  }

  #player-sprite.zone-left {
    left: min(50%, calc(50% - 100px));
    transform: translateX(-50%);
  }

  #player-sprite.zone-right {
    left: max(50%, calc(50% + 100px));
    transform: translateX(-50%);
  }

  #dragon-fx-sprite.zone-left {
    left: min(50%, calc(50% - 100px));
    transform: translateX(-50%);
  }

  #dragon-fx-sprite.zone-right {
    left: max(50%, calc(50% + 100px));
    transform: translateX(-50%);
  }

  #death-overlay .death-text {
    font-size: 48px; /* 80% of 72px */
  }

  .results-overlay {
    padding: 32px 16px; /* 80% of 40px 20px */
    gap: 19px; /* 80% of 24px */
    max-width: 640px; /* 80% of 800px */
  }

  .results-scroll {
    width: 140%;
    height: auto;
  }

  .results-content {
    padding: 26px 19px; /* 80% of 32px 24px */
    max-width: 288px; /* 80% of 360px */
  }

  .results-header {
    font-size: 19px; /* 80% of 24px */
    margin: -16px 0 8px 0; /* 80% of -20px 0 10px 0 */
  }

  .results-boss-list-wrapper {
    max-height: 240px; /* 80% of 300px */
  }

  .results-boss-list {
    max-height: 240px; /* 80% of 300px */
    gap: 10px; /* 80% of 12px */
    padding-right: 11px; /* 80% of 14px */
  }

  .result-row {
    grid-template-columns: 32px 1fr 64px; /* 80% of 40px 1fr 80px */
    gap: 10px; /* 80% of 12px */
    padding: 5px; /* 80% of 6px */
  }

  .result-link-icon {
    width: 26px; /* 80% of 32px */
    height: 26px;
  }

  .result-link-icon img {
    width: 16px; /* 80% of 20px */
    height: 16px;
  }

  .result-boss-name {
    font-size: 14px; /* 80% of 18px */
  }

  .result-tries {
    font-size: 11px; /* 80% of 14px */
  }

  .results-score-box {
    padding: 8px; /* 80% of 10px */
    min-height: 80px; /* 80% of 100px */
    margin-top: 10px; /* 80% of 12px */
  }

  .results-score-value {
    font-size: 38px; /* 80% of 48px */
  }

  .results-score-label {
    font-size: 13px; /* 80% of 16px */
    margin-top: 6px; /* 80% of 8px */
  }

  .results-timer {
    font-size: 14px; /* 80% of 18px */
    margin-top: -8px; /* 80% of -10px */
  }
}