/* Typography - Font Declarations */
@font-face {
  font-family: 'Beaufort';
  src: url('images/Font/BeaufortforLOL-Heavy.ttf') format('truetype');
}

@font-face {
  font-family: 'Beaufort-Regular';
  src: url('images/Font/BeaufortforLOL-Regular.ttf') format('truetype');
}

/* Base Styles */
body {
  margin: 0;
  padding: 0;
  background-color: #010A13;
  font-family: 'Beaufort', sans-serif;
  cursor: url("images/cursor_default.png"), auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ========== ANIMATIONS ========== */
/* Fade In and Zoom Effects */
@keyframes fadeInZoom {
  0% {
      opacity: 0;
      transform: scale(0);
  }
  50% {
      opacity: 0;
      transform: scale(0.7);
  }
  100% {
      opacity: 1;
      transform: scale(1);
  }
}

@keyframes zoomOut {
  0% {
      opacity: 1;
      transform: scale(1);
  }
  100% {
      opacity: 0;
      transform: scale(0.5);
  }
}

@keyframes correctAnswerReveal {
  0% {
      opacity: 0;
      transform: scale(0.7) rotate(-5deg);
  }
  20% {
      opacity: 0.1;
  }
  50% {
      opacity: 0.8;
      transform: scale(1.1) rotate(3deg);
  }
  100% {
      opacity: 1;
      transform: scale(1) rotate(0deg);
  }
}

@keyframes fadeOutZoom {
  0% {
      opacity: 1;
      transform: scale(1);
  }
  50% {
      opacity: 0.7;
      transform: scale(1.02);
  }
  100% {
      opacity: 0;
      transform: scale(0.9);
  }
}

/* ========== GRID ELEMENTS ========== */
/* Hide background during animation */
.grid-item.correct.animating {
  background-image: none !important;
}

/* Grid Headers */
.grid-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  color: #C89B3C;
  cursor: url("images/cursor_default.png"), auto;
}

.grid-header[data-tooltip-title],
.grid-header[data-tooltip-content],
.grid-header[data-tooltip-image] {
  position: relative;
  cursor: url("images/cursor_default.png"), auto;
}

.grid-header[data-tooltip-title]:hover,
.grid-header[data-tooltip-content]:hover,
.grid-header[data-tooltip-image]:hover {
  background-color: rgba(218, 165, 32, 0.1);
  border-radius: 10px;
}

/* Header Images */
.rank-image,
.column-image,
.row-image{
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.rank-image:hover,
.column-image:hover,
.row-image:hover{
  transform: scale(1.1);
}


/* ======== GRID HEADERS TEXT ======== */
.header-text {
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 18px;
  text-align: center;
  margin-top: 10px;
  width: 110%;
}

/* ========== TOOLTIPS ========== */
.tooltip {
  position: absolute;
  background-color: #0A1428;
  color: #F0E6D2;
  padding: 0;
  border-radius: 5px;
  font-family: 'Beaufort', sans-serif;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  z-index: 1001;
  display: none;
  max-width: 380px;
  min-width: 300px;
  border: 2px solid #C89B3C;
  pointer-events: none;
  animation: tooltipFadeIn 0.4s ease-in-out;
}



.tooltip-title {
  background-color: #091428;
  color: #C89B3C;
  font-size: 18px;
  font-weight: bold;
  padding: 10px 15px;
  border-bottom: 2px solid #C89B3C;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  text-align: center;
}

.tooltip-content-container {
  display: flex;
  padding: 10px;
  align-items: center;
}

.tooltip-image {
  margin-right: 10px;
  flex-shrink: 0;
}

.tooltip-image img {
  width: 130px;
  height: 240px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(218, 165, 32, 0.3);
}

.tooltip-text {
  font-family: 'Beaufort-Regular', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  flex-grow: 1;
  text-align: left;
  word-break: break-word;
}

/* ========== MODAL COMMON STYLES ========== */
.modal,
#game-over-modal,
#win-modal,
#solutions-modal,
#ff15-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: flex-start;
  padding-top: 200px;
  animation: fadeInZoom 0.1s ease-in-out;
}

.modal.closing,
#game-over-modal.closing,
#win-modal.closing,
#solutions-modal.closing,
#ff15-modal.closing {
  animation: fadeOutZoom 0.15s ease-in-out forwards;
  pointer-events: none;
}

/* ========== STANDARD MODAL STYLING ========== */
.modal-content {
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  background-color: #010A13;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 500px;
  min-height: 100px;
  overflow: hidden;
  position: relative;
}

#modal-instruction {
  font-size: 30px;
  margin-bottom: -10px;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  color: #F0E6D2;
}

#modal-cats {
  font-size: 15px;
  margin-bottom: 30px;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  color: rgba(240, 230, 210, 0.64);
}

/* ========== INPUT STYLING ========== */
#user-answer {
  padding: 10px;
  font-size: 18px;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  color: #F0E6D2;
  width: 400px;
  height: 53px;
  max-width: 100%;
  border: 2px solid #C89B3C !important;
  border-radius: 5px;
  box-sizing: border-box;
  background-color: #0A1428;
}

#user-answer:focus {
  outline: none;
}

/* ========== RESULTS DROPDOWN ========== */
.results {
  width: 100%;
  margin-top: 10px;
  max-height: 300px;
  max-width: 400px;
  overflow-y: auto;
  border: 1px solid #C89B3C;
  border-radius: 5px;
  display: none;
  color: #F0E6D2;
  scrollbar-color: #C89B3C #0A1428;
  background-color: #0A1428;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
}

.results.show {
  display: block;
}

.results ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.results li {
  padding: 8px 10px;
  cursor: url("images/cursor_hover.png"), auto;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.results li:hover {
  background-color: #0d343d;
}

.results li.active {
  background-color: #0d343d;
}

.results li.active .champion-name {
  color: #C89B3C;
  text-shadow: 0 0 3px rgba(200, 155, 60, 0.3);
}

.results li img {
  border: 1px solid #785A28;
  object-fit: cover;
}

.champion-name {
  transition: color 0.2s ease;
}

/* ========== BUTTON STYLING ========== */
button {
  width: 89px;
  height: 53px;
  background-color: #C89B3C;
  color: #F0E6D2;
  border-color: #C89B3C;
  border-radius: 5px;
  font-size: 18px;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  cursor: url("images/cursor_hover.png"), auto;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #F0E6D2;
  border-color: #F0E6D2;
  color: #C89B3C;
  cursor: url("images/cursor_hover.png"), auto;
}

/* ========== FF15 MODAL STYLING ========== */
.ff15modal-content {
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  background-color: #010A13;
  color: #F0E6D2;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 500px;
  min-height: 100px;
  overflow: hidden;
  position: relative;
}

.ff15modal-content h3 {
  font-size: 30px;
  margin-bottom: 10px;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  color: #F0E6D2;
}

.ff15modal-content p {
  margin-bottom: 20px;
  font-size: 15px;
  max-width: 400px;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  color: #F0E6D2;
}

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

#ff15-cancel-btn {
  font-size: 22px;
  background-color: #010A13;
  color: #C89B3C;
  border: 2px solid #C89B3C;
  border-radius: 4px;
  cursor: url("images/cursor_hover.png"), auto;
}

#ff15-cancel-btn:hover {
  font-size: 22px;
  background-color: #C89B3C;
  color: #010A13;
  border: 2px solid #C89B3C;
  border-radius: 4px;
  cursor: url("images/cursor_hover.png"), auto;
}

#ff15-confirm-btn {
  font-size: 22px;
  background-color: #010a13;
  color: red;
  border: 2px solid red;
  border-radius: 4px;
  cursor: url("images/cursor_hover.png"), auto;
}

#ff15-confirm-btn:hover {
  font-size: 22px;
  background-color: red;
  color: #010A13;
  border: 2px solid red;
  border-radius: 4px;
  cursor: url("images/cursor_hover.png"), auto;
}

/* ========== GAME OVER / WIN MODAL STYLING ========== */
.ffmodal-content {
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  background-color: #010A13;
  color: #F0E6D2;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 500px;
  min-height: 100px;
  overflow: hidden;
  position: relative;
}

.ffmodal-content h3 {
  font-size: 30px;
  margin-bottom: 10px;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  color: #F0E6D2;
}

.ffmodal-content p {
  font-size: 15px;
  margin-bottom: 10px;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  color: #F0E6D2;
}

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

.ffmodal-buttons button {
  padding: 16px 16px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
}

#continue-btn, #continue-win-btn {
  padding: 8px 16px;
  background-color: #C89B3C;
  color: #F0E6D2;
  border: 2px solid #F0E6D2;
  border-radius: 4px;
  cursor: url("images/cursor_hover.png"), auto;
  height: 60px;
  width: 120px;
}

#continue-btn:hover, #continue-win-btn:hover {
  padding: 8px 16px;
  background-color: #785A28;
  color: #F0E6D2;
  border: 2px solid #F0E6D2;
  border-radius: 4px;
  cursor: url("images/cursor_hover.png"), auto;
  height: 60px;
  width: 120px;
}

#reveal-btn {
  padding: 8px 16px;
  background-color: red;
  color: white;
  border: 2px solid red;
  border-radius: 4px;
  cursor: url("images/cursor_hover.png"), auto;
  height: 60px;
  width: 120px;
}

#reveal-btn:hover {
  padding: 8px 16px;
  background-color: rgb(187, 0, 0);
  color: #F0E6D2;
  border: 2px solid #F0E6D2;
  border-radius: 4px;
  cursor: url("images/cursor_hover.png"), auto;
  height: 60px;
  width: 120px;
}

/* ========== SOLUTIONS MODAL STYLING ========== */
.solutions-modal-content {
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  background-color: #010A13;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 500px;
  min-height: 100px;
  overflow: hidden;
  position: relative;
}

#solutions-modal-instruction {
  font-size: 30px;
  margin-bottom: -10px;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  color: #F0E6D2;
}

#solutions-modal-cats {
  font-size: 15px;
  margin-bottom: 30px;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  color: rgba(240, 230, 210, 0.64);
}

#solutions-dropdown {
  width: 400px;
  max-height: 400px;
  padding: 10px;
  margin: 10px 0;
  font-size: 16px;
  font-family: 'Beaufort', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  background-color: #0A1428;
  color: #F0E6D2;
  border: 2px solid #C89B3C;
  border-radius: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #C89B3C #0A1428;
}

#solutions-dropdown li {
  list-style: none;
  padding: 8px 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
}

#solutions-dropdown li:hover {
  background-color: #0d343d;
}

#solutions-dropdown li img {
  border-radius: 3px;
}

#solutions-dropdown .solution-name {
  font-size: 16px;
  font-weight: bold;
  color: #F0E6D2;
  text-transform: uppercase;
  margin-left: 10px;
}

#solutions-dropdown::-webkit-scrollbar {
  width: 8px;
  cursor: url("images/cursor_default.png"), auto;
}

#solutions-dropdown::-webkit-scrollbar-track {
  background: #0A1428;
  cursor: url("images/cursor_default.png"), auto;
}

#solutions-dropdown::-webkit-scrollbar-thumb {
  background-color: #C89B3C;
  border-radius: 4px;
  cursor: url("images/cursor_default.png"), auto;
}