body, html {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Roboto', sans-serif;
  color: #f1f6f0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-image: url('/assets/Bg-9rCTvYHB.png');
  background-size: cover;
  background-position: center;
  font-size: clamp(14px, 1.5vw, 16px);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-drag: none;
}

/* Main container layout */
.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1300px;
  height: 100vh;
  padding: 10px 0;
  position: relative;
}

/* user info and profile @tuanz376 credits*/

.profile-box {
  position: fixed;
  top: 24px;      /* Move to top */
  left: 24px;     /* Move to left */
  bottom: auto;   /* Remove bottom */
  right: auto;    /* Remove right */
  min-width: 280px;
  max-width: 280px;
  padding: 14px 20px 14px 18px;
  background: #232b36;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all 0.3s ease;
  gap: 0;
  z-index: 100;
  font-family: 'Roboto', sans-serif;
}
.profile-box:hover {
   transform: scale(1.01);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.7), 0 0 40px rgba(70, 90, 120, 0.4);
}

.profile-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  gap: 2px;
}

.profile-avatar {
  font-size: 32px;
  margin-bottom: 2px;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}

.profile-email {
  user-select: all;
  font-size: 15px;
  color: #bfc9d8;
  opacity: 0.5;
  margin-top: 2px;
  font-weight: 400;
}

.sign-out-btn {
  background: linear-gradient(to bottom, #536480, #414a56);
    color: #f1f6f0;
    border: none;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 #1e242b;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.profile-email.blurred {
  filter: blur(10px);
  transition: filter 0.2s;
  user-select: none;
  pointer-events: none;
}

.eye-btn {
  background: none;
  border: none;
  margin-left: 8px;
  cursor: pointer;
  vertical-align: middle;
  padding: 0;
  outline: none;
  display: inline-flex;
  align-items: center;
}
.eye-btn svg {
  display: block;
}
.profile-email-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
/* Login box styled like profile-box but separate */
#login-box {
  position: fixed;
  top: 24px;
  left: 24px;
  min-width: 280px;
  max-width: 280px;
  padding: 14px 20px 14px 18px;
  background: #232b36;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all 0.3s ease;
  z-index: 101;
  font-family: 'Roboto', sans-serif;
  /* Optional: hide by default, show with JS when needed */
  /* display: none; */
}
#login-box:hover {
  transform: scale(1.01);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.7), 0 0 40px rgba(70, 90, 120, 0.4);
}
#login-box .firebase-login {
  position: static;
  width: 100%;
}


/* Profile Progress Box (separate below profile box) */
.profile-progress-box {
  position: static;      /* Remove fixed */
  top: auto;             /* Remove top */
  left: auto;            /* Remove left */
  min-width: 280px;
  max-width: 280px;
  padding: 10px 20px 10px 18px;
  background: #232b36;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 99;
  font-family: 'Roboto', sans-serif;
  margin-top: 14px;      /* Add some space below profile box */
}

.profile-progress-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-level {
  font-size: 15px;
  font-weight: bold;
  color: #a1b4d1;
  min-width: 48px;
  text-align: right;
}

.profile-progress-bar {
  flex: 1;
  height: 12px;
  background: #303843;
  border-radius: 6px;
  overflow: hidden;
  margin: 0 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  position: relative;
}

.profile-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6c81a1 0%, #fdd179 100%);
  border-radius: 6px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-exp {
  font-size: 13px;
  color: #bfc9d8;
  min-width: 70px;
  text-align: left;
}
.profile-stack {
  position: fixed;
  top: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 100;
  min-width: 320px;
  max-width: 340px;
  gap: 0;
}
.profile-box,
.profile-progress-box {
  position: static;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}
.profile-progress-box {
  margin-top: 14px;
}
.hidden {
  display: none !important;
}


/* Game title with enhanced Nordic glow effect */
/* Attempting Title animation effect */
.game-title {
  margin-bottom: 10px;
  text-align: center;
  margin-top: 10px;
  position: relative;
  overflow: visible;
}

/* Basic styling with improved hover effect */
.game-title img {
  max-width: 200px;
  height: auto;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: drop-shadow(0 0 10px rgba(253, 209, 121, 0.5));
  position: relative;
  z-index: 2; /* Image in the middle layer */
}

/* Enhanced hover effect for the image */
.game-title:hover img {
  filter: drop-shadow(0 0 15px rgba(253, 209, 121, 0.8));
  animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(253, 209, 121, 0.5)); }
  50% { filter: drop-shadow(0 0 20px rgba(253, 209, 121, 0.8)); }
}

/* Style for all runes with dark blue stroke */
.game-title::after,
.game-title .rune-1,
.game-title .rune-2,
.game-title .rune-3,
.game-title .rune-4,
.game-title .rune-5,
.game-title .rune-6,
.game-title .rune-7,
.game-title .rune-8,
.game-title .rune-9,
.game-title .rune-10 {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  z-index: 3; /* Runes above the image */
  transition: opacity 0.3s ease;
  font-size: 28px;
  color: rgba(245, 245, 250, 0.95); /* Whitish color */
  text-shadow: 
  -1px -1px 0 #1e243b,
  1px -1px 0 #1e243b,
  -1px 1px 0 #1e243b,
  1px 1px 0 #1e243b,
  -2px 0 0 #1e243b,
  2px 0 0 #1e243b,
  0 -2px 0 #1e243b,
  0 2px 0 #1e243b,
  -2px -2px 0 #1e243b,
  2px -2px 0 #1e243b,
  -2px 2px 0 #1e243b,
  2px 2px 0 #1e243b,
  0 0 8px rgba(255, 255, 255, 0.6);
  /* Dark blue text-shadow creates the stroke effect */
}

/* Position the runes around the logo */
.game-title::after {
  content: 'ᚠ';
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
}

.game-title .rune-1 {
  top: 60%;
  left: 20%;
  font-size: 32px;
}

.game-title .rune-2 {
  top: 25%;
  right: 18%;
  font-size: 30px;
}

.game-title .rune-3 {
  bottom: 15%;
  right: 25%;
}

.game-title .rune-4 {
  bottom: 35%;
  left: 22%;
  font-size: 26px;
}

.game-title .rune-5 {
  top: 40%;
  right: 20%;
  font-size: 34px;
}

.game-title .rune-6 {
  bottom: 25%;
  left: 35%;
}

/* Additional runes with interesting paths */
.game-title .rune-7 {
  top: 30%;
  left: 25%;
  font-size: 24px;
}

.game-title .rune-8 {
  bottom: 10%;
  right: 15%;
  font-size: 36px;
}

.game-title .rune-9 {
  top: 15%;
  left: 18%;
  font-size: 28px;
}

.game-title .rune-10 {
  bottom: 30%;
  right: 22%;
  font-size: 30px;
}

/* Show runes on hover */
.game-title:hover::after,
.game-title:hover .rune-1,
.game-title:hover .rune-2,
.game-title:hover .rune-3,
.game-title:hover .rune-4,
.game-title:hover .rune-5,
.game-title:hover .rune-6,
.game-title:hover .rune-7,
.game-title:hover .rune-8,
.game-title:hover .rune-9,
.game-title:hover .rune-10 {
  opacity: 1;
}

/* Complex animations for each rune */
.game-title:hover::after {
  animation: runeFloat 4s ease-in-out infinite, runeGlow 2s ease-in-out infinite;
  animation-delay: 0.1s;
}

.game-title:hover .rune-1 {
  animation: runePath1 8s ease-in-out infinite, runeGlow 2.5s ease-in-out infinite;
  animation-delay: 0.7s;
}

.game-title:hover .rune-2 {
  animation: runeFloat 4.5s ease-in-out infinite, runeGlow 3s ease-in-out infinite;
  animation-delay: 0.3s;
}

.game-title:hover .rune-3 {
  animation: runePath2 7s ease-in-out infinite, runeGlow 2.2s ease-in-out infinite;
  animation-delay: 0.9s;
}

.game-title:hover .rune-4 {
  animation: runeFloat 6s ease-in-out infinite, runeGlow 3.5s ease-in-out infinite;
  animation-delay: 0.5s;
}

.game-title:hover .rune-5 {
  animation: runePath3 9s ease-in-out infinite, runeGlow 2.8s ease-in-out infinite;
  animation-delay: 0.2s;
}

.game-title:hover .rune-6 {
  animation: runeFloat 5.2s ease-in-out infinite, runeGlow 3.2s ease-in-out infinite;
  animation-delay: 0.6s;
}

.game-title:hover .rune-7 {
  animation: runePath2 6.5s ease-in-out infinite, runeGlow 2.7s ease-in-out infinite;
  animation-delay: 0.4s;
}

.game-title:hover .rune-8 {
  animation: runePath1 8.5s ease-in-out infinite, runeGlow 3.3s ease-in-out infinite;
  animation-delay: 0.8s;
}

.game-title:hover .rune-9 {
  animation: runePath3 7.5s ease-in-out infinite, runeGlow 2.9s ease-in-out infinite;
  animation-delay: 0.3s;
}

.game-title:hover .rune-10 {
  animation: runeFloat 5.8s ease-in-out infinite, runeGlow 3.1s ease-in-out infinite;
  animation-delay: 0.7s;
}

/* Simple float animation */
@keyframes runeFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(5deg); }
  75% { transform: translateY(10px) rotate(-5deg); }
}

/* Circular path animation */
@keyframes runePath1 {
  0% { transform: translate(0, 0); }
  25% { transform: translate(20px, -15px) rotate(5deg); }
  50% { transform: translate(0, -30px) rotate(0deg); }
  75% { transform: translate(-20px, -15px) rotate(-5deg); }
  100% { transform: translate(0, 0); }
}

/* Figure-8 path animation */
@keyframes runePath2 {
  0% { transform: translate(0, 0) rotate(0deg); }
  15% { transform: translate(15px, -10px) rotate(5deg); }
  30% { transform: translate(0, -15px) rotate(0deg); }
  45% { transform: translate(-15px, -10px) rotate(-5deg); }
  50% { transform: translate(0, 0) rotate(0deg); }
  65% { transform: translate(15px, 10px) rotate(-5deg); }
  80% { transform: translate(0, 15px) rotate(0deg); }
  95% { transform: translate(-15px, 10px) rotate(5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Arc path animation */
@keyframes runePath3 {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(25px, -5px) rotate(10deg); }
  50% { transform: translate(35px, 0) rotate(0deg); }
  75% { transform: translate(25px, 5px) rotate(-10deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes runeGlow {
  0%, 100% { 
    text-shadow: 
      -1px -1px 0 #1e243b,
      1px -1px 0 #1e243b,
      -1px 1px 0 #1e243b,
      1px 1px 0 #1e243b,
      -2px 0 0 #1e243b,
      2px 0 0 #1e243b,
      0 -2px 0 #1e243b,
      0 2px 0 #1e243b,
      -2px -2px 0 #1e243b,
      2px -2px 0 #1e243b,
      -2px 2px 0 #1e243b,
      2px 2px 0 #1e243b,
      0 0 8px rgba(255, 255, 255, 0.6);
    color: rgba(245, 245, 250, 0.95);
  }
  50% { 
    text-shadow: 
    -1px -1px 0 #1e243b,
    1px -1px 0 #1e243b,
    -1px 1px 0 #1e243b,
    1px 1px 0 #1e243b,
    -2px 0 0 #1e243b,
    2px 0 0 #1e243b,
    0 -2px 0 #1e243b,
    0 2px 0 #1e243b,
    -2px -2px 0 #1e243b,
    2px -2px 0 #1e243b,
    -2px 2px 0 #1e243b,
    2px 2px 0 #1e243b,
    0 0 15px rgba(255, 255, 255, 0.9),
    0 0 20px rgba(253, 209, 121, 0.5);
  color: rgba(255, 255, 255, 1);
  }
}

/* Attempting Title animation effect end */

/* Content wrapper - fixing layout to be horizontal */
.content-wrapper {
  display: flex;
  width: 100%;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin: 20px 0;
}

/* Center container for the login area */
.center-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: auto;
  margin: 0 30px;
}

/* Updates and Advertisements (Early Access) boxes */
#updates, #advertisements {
  height: 280px; /* Or use max-height if you want it to grow up to a point */
  width: 280px;
  margin: 0;
  overflow-y: auto; /* Enables vertical scroll when needed */
  overflow-x: hidden; /* Prevents horizontal scroll if not needed */
}

/* Custom Scrollbar Styling */
#updates::-webkit-scrollbar,
#advertisements::-webkit-scrollbar {
  width: 10px;
}

#updates::-webkit-scrollbar-track,
#advertisements::-webkit-scrollbar-track {
  background: rgba(30, 36, 43, 0.4); /* Slightly lighter than box bg */
  border-radius: 8px;
}

#updates::-webkit-scrollbar-thumb,
#advertisements::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #fdd179, #cba454);
  border-radius: 8px;
  border: 2px solid rgba(30, 36, 43, 0.85); /* Matches box bg to create padding illusion */
}

#updates::-webkit-scrollbar-thumb:hover,
#advertisements::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffe7b3, #dcb064);
}

/* Firefox support */
#updates,
#advertisements {
  scrollbar-color: #fdd179 rgba(30, 36, 43, 0.4);
  scrollbar-width: thin;
}

/* Updated box styling - more minimalist */
.box {
  background: rgba(30, 36, 43, 0.85);
  padding: clamp(15px, 3vw, 25px);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  width: 100%;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Making headers more Nordic with rune-inspired separators */
.box h2 {
  color: #fdd179;
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 10px;
  font-size: clamp(20px, 3vw, 24px);
  position: relative;
  letter-spacing: 1px;
}

.box h2:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 30%;
  right: 30%;
  height: 3px;
  background: linear-gradient(to right, transparent, rgba(253, 209, 121, 0.7), transparent);
}

/*  discord button position and styling */
#discord {
  position: fixed;
  bottom: 20px;
  left: 120px;
  z-index: 100;
}
#discord-button {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(30, 36, 43, 0.7);
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(70, 90, 120, 0.3);
  transition: all 0.3s ease;
  width: 70px;
  height: 70px;
  text-decoration: none;
}

#discord-button img {
  width: 50px;
  height: 50px;
}

#reddit {
  position: fixed;
  bottom: 20px;
  left: 220px;
  z-index: 100;
}
#reddit-button {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(30, 36, 43, 0.7);
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(70, 90, 120, 0.3);
  transition: all 0.3s ease;
  width: 70px;
  height: 70px;
  text-decoration: none;
}

#reddit-button img {
  width: 50px;
  height: 50px;
}
/*Landing Page Settings button*/
#settingsLanding {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
}
#settingsbutton {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(30, 36, 43, 0.7);
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(70, 90, 120, 0.3);
  transition: all 0.3s ease;
  width: 70px;
  height: 70px;
  text-decoration: none;
}

#settingsbutton img {
  width: 50px;
  height: 50px;
}

#discord-button:hover, #settingsbutton:hover, #reddit-button:hover, #leaderboard-button:hover {
  transform: scale(1.1);
  background: rgba(40, 48, 58, 0.8);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 25px rgba(70, 90, 120, 0.4);
}
/* End landing page settings button */
/* YouTube Video Preview Container */
.youtube-preview {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
  width: 280px;
  height: 157px; /* 16:9 aspect ratio */
  background: rgba(30, 36, 43, 0.9);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 30px rgba(70, 90, 120, 0.3);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.youtube-preview:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.7), 0 0 40px rgba(70, 90, 120, 0.4);
}

.youtube-preview .video-thumbnail {
  position: relative;
  width: 100%;
  height: 100%;
}

.youtube-preview .video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.youtube-preview:hover .video-thumbnail img {
  transform: scale(1.02);
  filter: brightness(1.1);
}
/* End Youtube video preview */

/* Improved landing section - chunkier, more minimalistic */
#landing {
  background: rgba(30, 36, 43, 0.9);
  padding: clamp(20px, 4vw, 30px);
  width: min(320px, 90vw);
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 30px rgba(70, 90, 120, 0.3);
  backdrop-filter: blur(12px);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin: 0;
  position: relative;
}

#landing:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.7), 0 0 40px rgba(70, 90, 120, 0.4);
}

#landing input::placeholder {
  color: #a9a9a9;
  font-weight: normal;
}

#landing input:focus {
  outline: none;
  background: rgba(48, 56, 67, 0.9);
  border-bottom: 3px solid #fdd179;
  box-shadow: 0 5px 15px rgba(253, 209, 121, 0.2);
}

/* Chunkier, more Nordic play button */
#landing button, #play {
  background: #fdd179;
  color: #303843;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-weight: 900;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 15px;
  width: 90%;
  margin-top: 25px;
  border-radius: 4px;
  box-shadow: 0 6px 0 #d9a44c;
  position: relative;
  overflow: hidden;
}

#landing button:before, #play:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s ease;
}

#landing button:hover:before, #play:hover:before {
  left: 100%;
}

#landing button:hover, #play:hover {
  background: #e0b65e;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #d9a44c;
}

#landing button:active, #play:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #d9a44c;
}

/* More Viking-styled inputs */
#landing input {
  background: rgba(38, 46, 57, 0.7);
  border: none;
  border-bottom: 3px solid #fdd179;
  color: #f1f6f0;
  padding: 15px;
  border-radius: 4px 4px 0 0;
  width: 90%;
  margin: 15px auto;
  font-size: 16px;
  transition: all 0.3s ease;
  font-weight: bold;
}

/* Further Norse-inspired refinements and responsive design */
.bottom-section {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 40px;
  position: relative;
  margin-top: 30px;
}

/* Responsive design for different screen sizes */
@media (max-width: 992px) {
  .content-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  
  #updates, #advertisements {
    width: 90%;
    max-width: 320px;
    min-height: auto;
    margin-bottom: 20px;
  }
  
  #landing {
    margin-bottom: 20px;
  }
  
  #discord {
    position: fixed;
    bottom: 15px;
    left: 15px;
  }
}

@media (max-width: 768px) {
  .game-title img {
    max-width: 180px;
  }
  
  #discord-button {
    width: 70px;
    height: 70px;
  }
  
  #discord-button img {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  #landing, #updates, #advertisements {
    width: 90%;
    max-width: 320px;
    padding: 15px;
  }
  
  .game-title img {
    max-width: 150px;
  }
  
  #discord-button {
    width: 60px;
    height: 60px;
  }
  
  #discord-button img {
    width: 40px;
    height: 40px;
  }
}
.discord-link {
  display: inline-block;
  background: #7289DA;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  margin: 0 5px;
  box-shadow: 0 3px 0 #5865F2;
  transition: all 0.2s ease;
}

.discord-link:hover {
  background: #5865F2;
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #4752C4;
}

.discord-link:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #4752C4;
}

/* Loading screen enhancements */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 26, 33, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.loading-content {
  text-align: center;
}

#loading-title {
  max-width: 250px;
  margin-bottom: 30px;
  filter: drop-shadow(0 0 25px rgba(253, 209, 121, 0.9));
}

.loading-bar-container {
  width: 80%;
  max-width: 400px;
  height: 20px;
  background: rgba(40, 46, 53, 0.6);
  border-radius: 10px;
  margin: 20px auto;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

#loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #e0b65e, #fdd179);
  border-radius: 8px;
  transition: width 0.5s ease;
}

#loading-text {
  color: #f1f6f0;
  font-size: 16px;
  margin-top: 15px;
}

#loading-progress {
  color: #fdd179;
  font-weight: bold;
}

/* Landing page end */
/*loading screen styles*/
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/assets/Bg-9rCTvYHB.png');
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  text-align: center;
  max-width: 500px;
  padding: 20px;
}

#loading-title {
  max-width: 100%;
  height: auto;
  margin-bottom: 40px;
  filter: drop-shadow(0 0 10px #F4CA75);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.loading-bar-container {
  background: #303843;
  height: 30px;
  border-radius: 15px;
  padding: 5px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid #fdd179;
}

#loading-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #fdd179, #F4CA75);
  border-radius: 10px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

#loading-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
      rgba(255, 255, 255, 0) 0%, 
      rgba(255, 255, 255, 0.3) 50%, 
      rgba(255, 255, 255, 0) 100%);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

#loading-text {
  color: #f1f6f0;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#chat-container {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: left;
  justify-content: center;
  background-color: rgba(48, 56, 67, 0.85);
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  z-index: 1000;
  overflow: hidden;
  display: none; /* Hidden by default, shown when chat is active */
}

#chat-completion-container {
  display: flex;
  align-items: flex-end;
  box-sizing: border-box;
  padding: 10px;
  width: 400px;
  background-color: rgba(48, 56, 67, 0.85);
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  z-index: 1000;
  overflow: hidden;
  display: none;
}

#chat-input-container {
  display: flex;
  align-items: center;
  width: 400px;
  background-color: rgba(48, 56, 67, 0.85);
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  z-index: 1000;
  overflow: hidden;
}
#chat-toggle-button {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #f1f6f0;
  font-size: 18px;
  font-weight: bolder;
  background-color: #405273;
  transition: background-color 0.2s ease;
  border-radius: 20px 0 0 20px;
}
#chat-toggle-button.team-mode {
  background-color: #b55945;
}

#chat-input {
  flex: 1;
  height: 100%;
  padding: 0 15px;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f6f0;
  font-size: 16px;
  font-weight: bolder;
}
#chat-input::placeholder {
  color: #96a9c1;
}

@keyframes slide-in {
  from { 
      transform: translateX(-50px);
      opacity: 0;
  }
  to { 
      transform: translateX(0);
      opacity: 1;
  }
}

/* Crafting UI */

/* Crafting UI Styles */
/* Original Styling - Kept exactly as is */
#crafting-container {
  position: absolute;
  top: 395px;
  left: 285px;
  transform: translate(-50%, -50%);
  width: 550px;
  height: 350px;
  background: rgba(30, 36, 43);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  color: #f1f6f0;
  font-family: 'Roboto', sans-serif;
  transition: opacity 0.3s ease;
  display: none;
  z-index: 1000;
}

/* Tabs styling */
.tabs {
  display: flex;
  background: #1e242b;
  padding: 3px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  position: relative
}

.tabs .tab {
  background: none;
  border: none;
  color: #f1f6f0;
  padding: 6px 8px;
  cursor: pointer;
  flex: 0 0 auto;
  min-width: 106px;
  margin-right: 2px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.tabs .tab:hover {
  background: #485667;
}

.tabs .tab.active {
  border-bottom: 2px solid #6c81a1;
  color: #6c81a1;
}

/* Main content area with two panels */
.crafting-content {
  display: flex;
  height: calc(100% - 70px);
}

/* Left: Recipe List */
.recipes-list {
  width: 40%;
  background: rgba(30, 36, 43);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #6c81a1 #2A303A;
  font-size: 14px;
}

.recipes-list::-webkit-scrollbar {
  width: 6px;
}

.recipes-list::-webkit-scrollbar-track {
  background: #303843;
  border-radius: 3px;
}

.recipes-list::-webkit-scrollbar-thumb {
  background-color: #6c81a1;
  border-radius: 3px;
}

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

.recipes-list li {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.recipes-list li:hover,
.recipes-list li.active {
  background: #485667;
}

.recipes-list li img {
  width: 30px;
  height: 30px;
  margin-right: 8px;
  object-fit: contain;
}

.recipes-list .item-name {
  font-weight: bold;
}

.recipes-list .item-category {
  margin-left: auto;
  font-size: 12px;
  color: #a9a9a9;
  background: #1e242b;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Right: Recipe Details */
.recipe-details {
  width: 60%;
  padding: 10px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
}

.item-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 70px;
  background: #1e242b;
  border-radius: 8px;
  margin-bottom: 2px;
}

.item-preview img {
  max-width: 60px;
  max-height: 60px;
  object-fit: contain;
}

#selected-item-name {
  color: #a1b4d1;
  margin: 0 0 0px 0;
  text-align: center;
  font-size: 18px;
}

#selected-item-description {
  color: #f1f6f0;
  margin-bottom: 8px;
  line-height: 1.3;
  flex-grow: 1;
  font-size: 13px;
  max-height: 70px;
}

#crafting-requirements {
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0px;
  font-weight: bolder;
}

.requirement {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 6px;
  padding: 2px;
  height: 52px;
  font-weight: bolder;
}

.requirement img {
  width: 36px;
  height: 36px;
}

.requirement.insufficient .cost {
  color: #b55945;
  font-weight: bolder;
}

/* Add new resource count display */
.requirement:after {
  content: attr(data-count);
  display: block;
  font-weight: 900;
  font-size: 14px;
  color: #f1f6f0;
}

.requirement.insufficient:after {
  color: #b55945;
  font-weight: bolder;
}

#craft-button {
  background: linear-gradient(to bottom,#6c81a1, #536480);
  color: #f1f6f0;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-weight: 900;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 4px 0 #1e242b;
  margin-top: 5px;
}

#craft-button:hover:not(:disabled) {
  background: linear-gradient(to bottom,  #7c91b1, #6c81a1);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1e242b;
}

#craft-button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1e242b;
}

#craft-button:disabled {
  background: #414a56;
  color: #8a9199;
  cursor: not-allowed;
  box-shadow: 0 4px 0 #1e242b;
}

/* ==================== CHUNKY & MAGICAL ENHANCEMENTS ==================== */
/* These additions won't change your original styling, just enhance it */

/* Container enhancements */
#crafting-container {
  --show-animation-duration: 0.5s;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
  transform-origin: center;
  
}

/* When container is shown (use JS to add this class) */
#crafting-container.show {
  display: block;
  animation: container-appear var(--show-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
#crafting-container:hover {
  opacity: 0.9 !important; /* Use !important to ensure this rule takes priority */
}
@keyframes container-appear {
  from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
}

/* Chunky tabs */
.tabs {
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.tabs .tab {
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tabs .tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(108, 129, 161, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.tabs .tab:hover::before {
  transform: translateY(0);
}

.tabs .tab.active {
  transform: translateY(-3px);
}

/* Recipe list item enhancements */
.recipes-list li {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  margin: 4px 6px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.recipes-list li:hover {
  transform: translateX(4px);
}

.recipes-list li.active {
  box-shadow: inset 0 0 0 2px rgba(108, 129, 161, 0.5);
}

.recipes-list li::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
              rgba(255, 255, 255, 0) 0%, 
              rgba(255, 255, 255, 0.1) 50%,
              rgba(255, 255, 255, 0) 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.recipes-list li:hover::after {
  transform: translateX(100%);
}

.item-preview {
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.4s ease;
}

.item-preview:hover {
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4), 
              0 0 15px rgba(108, 129, 161, 0.3);
}

/* Keep the subtle glow effect */
.item-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(108, 129, 161, 0.4) 0%,
    rgba(108, 129, 161, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.item-preview:hover::before {
  opacity: 1;
  animation: gentle-pulse 3s infinite alternate;
}

@keyframes gentle-pulse {
  0% { opacity: 0.2; }
  100% { opacity: 0.6; }
}

/* New magical shimmer effect instead of stars */
.item-preview::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.1) 40%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 60%,
    rgba(255, 255, 255, 0) 65%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
  transform: rotate(45deg);
}


/* Magical dust particles using box-shadow and pseudo elements */
.item-preview:hover {
  animation: emit-particles 3s infinite;
}

@keyframes emit-particles {
  0%, 100% { box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4), 
                         0 0 15px rgba(108, 129, 161, 0.3); }
  50% { box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4), 
                    0 0 20px rgba(108, 129, 161, 0.5); }
}

/* Enhanced image effect - keep this part */
.item-preview img {
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.5s ease;
  position: relative;
  z-index: 3;
}

.item-preview:hover img {
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
  animation: subtle-float 3s infinite ease-in-out;
}

@keyframes subtle-float {
  0%, 100% { transform: scale(1.15) translateY(0px); }
  50% { transform: scale(1.15) translateY(-2px); }
}

/* Chunky requirements */
.requirement {
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-weight: bolder;
}

.requirement:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.requirement img {
  transition: transform 0.3s ease;
}

.requirement:hover img {
  transform: scale(1.12);
}

.requirement.insufficient {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
  animation-delay: 0.2s;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-2px, 0, 0); }
  40%, 60% { transform: translate3d(2px, 0, 0); }
}

/* Enhanced craft button */
#craft-button {
  overflow: hidden;
  position: relative;
}

#craft-button:not(:disabled)::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg) translateY(-100%);
  animation: button-shine 4s infinite;
}

@keyframes button-shine {
  0% { transform: rotate(30deg) translateY(-100%); }
  30% { transform: rotate(30deg) translateY(250%); }
  100% { transform: rotate(30deg) translateY(250%); }
}

/* Button press enhanced effect */
#craft-button:active:not(:disabled) {
  animation: button-press 0.3s forwards;
}

@keyframes button-press {
  0% { transform: translateY(-2px); }
  40% { transform: translateY(4px) scale(0.97); }
  100% { transform: translateY(2px); }
}

/* Crafting Button Drama */

/* =============== MAGICAL CRAFTING ANIMATION =============== */
/* Animation triggered by crafting-animation class */

/* Setup variables for animation timing */
:root {
  --craft-anim-duration: 2.5s;
  --craft-anim-timing: cubic-bezier(0.22, 0.68, 0.31, 1.2);
}

/* Energy gather from requirements */
#crafting-container.crafting-animation #crafting-requirements .requirement:nth-child(1) {
  animation: requirement-glow 0.4s var(--craft-anim-timing) forwards;
  animation-delay: 0.1s;
}

#crafting-container.crafting-animation #crafting-requirements .requirement:nth-child(2) {
  animation: requirement-glow 0.4s var(--craft-anim-timing) forwards;
  animation-delay: 0.2s;
}

#crafting-container.crafting-animation #crafting-requirements .requirement:nth-child(3) {
  animation: requirement-glow 0.4s var(--craft-anim-timing) forwards;
  animation-delay: 0.3s;
}

#crafting-container.crafting-animation #crafting-requirements .requirement:nth-child(4) {
  animation: requirement-glow 0.4s var(--craft-anim-timing) forwards;
  animation-delay: 0.4s;
}

@keyframes requirement-glow {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.2); filter: brightness(1.8); box-shadow: 0 0 20px rgba(108, 129, 161, 0.8); }
  100% { transform: scale(1); filter: brightness(1); }
}


.requirement {
  position: relative;
  z-index: 5;
}

#crafting-container.crafting-animation .requirement::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, rgba(108, 129, 161, 0.8), rgba(255, 255, 255, 0));
  transform-origin: left center;
  transform: translateY(-50%);
  opacity: 0;
  z-index: 10;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}


/* Item Preview Magical Animation */
#crafting-container.crafting-animation .item-preview {
  animation: item-preview-activate 0.8s var(--craft-anim-timing);
  animation-delay: 0.7s;
  position: relative;
  overflow: hidden;
}

@keyframes item-preview-activate {
  0% { box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: inset 0 0 30px rgba(108, 129, 161, 0.8), 0 0 30px rgba(108, 129, 161, 0.5); }
  100% { box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3); }
}

/* Magical Circle Effect */
#crafting-container.crafting-animation .item-preview::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: 
    radial-gradient(circle, transparent 50%, rgba(108, 129, 161, 0.1) 55%, transparent 60%),
    radial-gradient(circle, transparent 45%, rgba(255, 255, 255, 0.1) 50%, transparent 55%);
  opacity: 0;
  z-index: 5;
  animation: magic-circle 1.5s ease-out forwards;
  animation-delay: 0.8s;
}

@keyframes magic-circle {
  0% { opacity: 0; transform: scale(0.8); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.2); }
}

/* Rune Circle Overlay */
#crafting-container.crafting-animation .item-preview::after {
  content: 'ᚠ ᚢ ᚦ ᚨ ᚱ ᚲ\A\ ᚷ ᚹ ᚺ ᚾ ᛁ ᛃ\A\ ᛇ ᛈ ᛉ ᛋ ᛏ ᛒ\A\ ᛖ ᛗ ᛚ ᛜ ᛞ ᛟ\A\ ᛠ ᛡ ᛢ ᛣ ᛤ ᛥ\A\ ᛦ ᛧ ᛨ ᛩ ᛪ ᛫\A\ ᛬ ᛭ ᛮ ᛯ ᛰ ᛱ\A\ ᛲ ᛳ ᛴ ᛵ ᛶ ᛷ\A\ ᛸ ᚠ ᚢ ᚦ ᚨ';
  white-space: pre;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  font-family: 'Noto Sans Runic', 'Roboto' sans-serif;
  left: 0;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  letter-spacing: 12px;
  color: rgba(255, 255, 255, 0);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0);
  opacity: 0;
  z-index: 6;
  animation: rune-reveal 1.6s ease-out forwards;
  animation-delay: 1s;
  background: none !important; /* Force no background */
  box-shadow: none !important; /* Force no box-shadow */
  border: none !important; /* Force no border */
}

@keyframes rune-reveal {
  0% { opacity: 0; transform: scale(0.8) rotate(0deg); color: rgba(255, 255, 255, 0); text-shadow: 0 0 8px rgba(255, 255, 255, 0); }
  30% { opacity: 1; color: rgba(255, 255, 255, 0.9); text-shadow: 0 0 8px rgba(255, 255, 255, 0.8); }
  70% { opacity: 1; color: rgba(255, 255, 255, 0.9); text-shadow: 0 0 8px rgba(255, 255, 255, 0.8); }
  100% { opacity: 0; transform: scale(1.2) rotate(90deg); color: rgba(255, 255, 255, 0); text-shadow: 0 0 8px rgba(255, 255, 255, 0); }
}

/* Item Image Animation */
#crafting-container.crafting-animation #selected-item-image {
  animation: item-transform 1.5s var(--craft-anim-timing);
  animation-delay: 1s;
  position: relative;
  z-index: 10;
}

@keyframes item-transform {
  0% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
  40% { transform: scale(1.4) rotate(-10deg); filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)); }
  60% { transform: scale(1.5) rotate(5deg); filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.9)); }
  80% { transform: scale(1.2) rotate(-2deg); filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.7)); }
  100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
}

/* Final Energy Burst */
.recipe-details {
  position: relative;
}

#crafting-container.crafting-animation .recipe-details::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.9) 0%, rgba(108, 129, 161, 0.5) 30%, transparent 70%);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
  animation: energy-burst 1s ease-out forwards;
  animation-delay: 1.6s;
}

@keyframes energy-burst {
  0% { opacity: 0; transform: scale(0.1); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: scale(2); }
}

/* Particle Effects using multiple box-shadows */
#crafting-container.crafting-animation .recipe-details::after {
  content: '';
  position: absolute;
  top: 35%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: transparent;
  border-radius: 50%;
  box-shadow: 
    0 0 0 white,
    20px -15px 0 -1px rgba(255, 255, 255, 0.8),
    -20px -15px 0 -1px rgba(255, 255, 255, 0.8),
    40px -25px 0 -1px rgba(255, 255, 255, 0.6),
    -40px -25px 0 -1px rgba(255, 255, 255, 0.6),
    15px -45px 0 -1px rgba(255, 255, 255, 0.7),
    -15px -45px 0 -1px rgba(255, 255, 255, 0.7),
    30px -65px 0 -1px rgba(255, 255, 255, 0.5),
    -30px -65px 0 -1px rgba(255, 255, 255, 0.5),
    0px -35px 0 -1px rgba(255, 255, 255, 0.9),
    10px -20px 0 -1px rgba(108, 129, 161, 0.8),
    -10px -20px 0 -1px rgba(108, 129, 161, 0.8),
    25px -40px 0 -1px rgba(108, 129, 161, 0.6),
    -25px -40px 0 -1px rgba(108, 129, 161, 0.6);
  opacity: 0;
  z-index: 20;
  pointer-events: none;
  animation: particle-explosion 1s ease-out forwards;
  animation-delay: 1.8s;
}

@keyframes particle-explosion {
  0% { opacity: 0; transform: scale(0); }
  10% { opacity: 1; transform: scale(0.2); }
  50% { opacity: 1; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(3); box-shadow: 
    0 0 0 white,
    40px -30px 0 -2px rgba(255, 255, 255, 0),
    -40px -30px 0 -2px rgba(255, 255, 255, 0),
    80px -50px 0 -2px rgba(255, 255, 255, 0),
    -80px -50px 0 -2px rgba(255, 255, 255, 0),
    30px -90px 0 -2px rgba(255, 255, 255, 0),
    -30px -90px 0 -2px rgba(255, 255, 255, 0),
    60px -130px 0 -2px rgba(255, 255, 255, 0),
    -60px -130px 0 -2px rgba(255, 255, 255, 0),
    0px -70px 0 -2px rgba(255, 255, 255, 0),
    20px -40px 0 -2px rgba(108, 129, 161, 0),
    -20px -40px 0 -2px rgba(108, 129, 161, 0),
    50px -80px 0 -2px rgba(108, 129, 161, 0),
    -50px -80px 0 -2px rgba(108, 129, 161, 0);
  }
}


/* Success Ripple Animation */
#crafting-container.crafting-animation #craft-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  animation: button-ripple 1s ease-out forwards;
}

@keyframes button-ripple {
  0% { width: 10px; height: 10px; opacity: 1; }
  100% { width: 300px; height: 300px; opacity: 0; }
}

/* Craft Button Success Animation */
#crafting-container.crafting-animation #craft-button {
  animation: craft-button-press var(--craft-anim-duration) var(--craft-anim-timing);
}

@keyframes craft-button-press {
  0% { transform: translateY(0); box-shadow: 0 4px 0 #1e242b; }
  10% { transform: translateY(4px); box-shadow: 0 0 0 #1e242b; }
  30% { transform: translateY(0); box-shadow: 0 4px 0 #1e242b; }
  40% { transform: translateY(2px); box-shadow: 0 2px 0 #1e242b; }
  50% { transform: translateY(-4px); box-shadow: 0 8px 0 #1e242b; }
  75% { transform: translateY(-2px); box-shadow: 0 6px 0 #1e242b; }
  100% { transform: translateY(0); box-shadow: 0 4px 0 #1e242b; }
}

/* Enhancement for item name to make it part of the animation */
#crafting-container.crafting-animation #selected-item-name {
  animation: item-name-glow 2s ease-out;
  animation-delay: 1.2s;
}

@keyframes item-name-glow {
  0% { color: #a1b4d1; text-shadow: none; }
  50% { color: #ffffff; text-shadow: 0 0 10px rgba(108, 129, 161, 0.8); }
  100% { color: #a1b4d1; text-shadow: none; }
}
/* end button animation drama */


/* Animation for when container is hidden (use JS to add this class) */
#crafting-container.hide {
  animation: container-disappear var(--show-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes container-disappear {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  to { transform: translate(-50%, -50%) scale(0.9); opacity: 0; display: none; }
}

/* ==================== TEAM MANAGEMENT UI ENHANCEMENT ==================== */
#team-container {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  max-height: 500px;
  background: rgba(30, 36, 43);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  border: 1px solid #303843;
  color: #f1f6f0;
  font-family: 'Roboto', sans-serif;
  transition: opacity 0.3s ease;
  opacity: 0.85;
  display: none;
  z-index: 1000;
  overflow: hidden;
  --show-animation-duration: 0.5s;
  --hide-animation-duration: 0.4s;
  will-change: transform, opacity;
}

/* Matching the exact entrance animation */
#team-container.show {
  display: block;
  animation: team-container-appear var(--show-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
#team-container[style*="pointer-events: none"] .join-button {
    cursor: wait;
}

@keyframes team-container-appear {
  from { 
    transform: translateX(-50%) scale(0.9); 
    opacity: 0; 
  }
  to { 
    transform: translateX(-50%) scale(1); 
    opacity: 0.85; 
  }
}

/* Hide animation */
#team-container.hide {
  animation: team-container-disappear var(--hide-animation-duration) cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
}

@keyframes team-container-disappear {
  from { 
    transform: translateX(-50%) scale(1); 
    opacity: 0.85; 
  }
  to { 
    transform: translateX(-50%) scale(0.9); 
    opacity: 0; 
  }
}

#team-container:hover {
  opacity: 0.9 !important;
}

.team-header {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #1e242b;
  padding: 10px 15px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.team-header h2 {
  color: #6c81a1;
  margin: 0;
  font-size: 40px;
}

.teams-list, .members-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 5px;
  scrollbar-width: thin;
  scrollbar-color: #6c81a1 #2A303A;
}

.teams-list::-webkit-scrollbar,
.members-list::-webkit-scrollbar {
  width: 6px;
}

.teams-list::-webkit-scrollbar-track,
.members-list::-webkit-scrollbar-track {
  background: #303843;
  border-radius: 3px;
}

.teams-list::-webkit-scrollbar-thumb,
.members-list::-webkit-scrollbar-thumb {
  background-color: #6c81a1;
  border-radius: 3px;
}

#teams-list-container, #members-list-container {
  list-style: none;
  padding: 0;
  margin: 0;
}

#teams-list-container li, #members-list-container li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 8px 10px;
  background: #2A303A;
  border-radius: 7px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

#teams-list-container li:hover, #members-list-container li:hover {
  background: #485667;
  transform: translateX(4px);
}

#teams-list-container li::after, #members-list-container li::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
              rgba(255, 255, 255, 0) 0%, 
              rgba(255, 255, 255, 0.1) 50%,
              rgba(255, 255, 255, 0) 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

#teams-list-container li:hover::after, #members-list-container li:hover::after {
  transform: translateX(100%);
}

.crown {
  color: #fdd179;
  margin-right: 5px;
}

.member-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button-group {
  display: flex;
  gap: 5px;
}

.create-team {
  display: flex;
  padding: 10px;
  gap: 5px;
  background: #2A303A;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.create-team input {
  flex: 1;
  padding: 8px 10px;
  border: none;
  background: #1e242b;
  color: #f1f6f0;
  border-radius: 5px;
}

.create-team input::placeholder {
  color: #8a9199;
}

.create-team input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #6c81a1;
}

button {
  background: linear-gradient(to bottom, #6c81a1, #536480);
  color: #f1f6f0;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  padding: 6px 12px;
  font-weight: bold;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* Basic hover for all buttons */
button:hover {
  background: linear-gradient(to bottom, #7c91b1, #6c81a1);
}

button:active {
  transform: translateY(1px);
}

/* ENHANCED ANIMATIONS ONLY FOR JOIN & CREATE BUTTONS */
button.join-button, 
.create-team button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

button.join-button:hover:not(:disabled), 
.create-team button:hover:not(:disabled) {
  background: linear-gradient(to bottom, #7c91b1, #6c81a1);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1e242b;
}

button.join-button:active:not(:disabled), 
.create-team button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1e242b;
}

/* Shine effect only for these specific buttons */
button.join-button:not(:disabled)::before,
.create-team button:not(:disabled)::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg) translateY(-100%);
  animation: button-shine 4s infinite;
  z-index: 1;
}

@keyframes button-shine {
  0% { transform: rotate(30deg) translateY(-100%); }
  30% { transform: rotate(30deg) translateY(250%); }
  100% { transform: rotate(30deg) translateY(250%); }
}

button:disabled {
  background: #414a56;
  color: #8a9199;
  cursor: not-allowed;
  box-shadow: 0 4px 0 #1e242b;
}

button.join-button {
  background: linear-gradient(to bottom, #6c81a1, #536480);
}

button.arrow-button {
  background: linear-gradient(to bottom, #485667, #394557);
  padding: 4px 8px;
}

button.transfer-button {
  background: linear-gradient(to bottom, #a4c5af, #84a58f);
  padding: 4px 8px;
}

button.leave-button, #leave-team-button {
  background: linear-gradient(to bottom, #b55945, #954835);
}

button.kick-button {
  background: linear-gradient(to bottom, #b55945, #954835);
  padding: 4px 8px;
}

.team-actions {
  padding: 10px;
  text-align: center;
  background: #2A303A;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.team-info {
  padding: 8px;
  text-align: center;
  background: #1e242b;
  position: relative;
  overflow: hidden;
}

/* Enhanced team name styling */
#current-team-name {
  color: #f1f6f0;
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  border-radius: 5px;
  display: inline-block;
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
}

/* Subtle side-to-side sliding border animation */


/* Pulse highlight animation on the container */
.team-info {
  padding: 8px;
  text-align: center;
  background: #1e242b;
  position: relative;
}

.team-info::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(108, 129, 161, 0.15) 0%,
    rgba(108, 129, 161, 0) 70%
  );
  opacity: 0;
  animation: team-info-pulse 3s infinite alternate;
}

@keyframes team-info-pulse {
  0% { opacity: 0; }
  100% { opacity: 1; }
}


/* Arrow indicator that can be toggled */
.arrow-indicator {
  display: inline-block;
  color: #fdd179;
  margin-right: 5px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.arrow-active .arrow-indicator {
  opacity: 1;
}




/* Team action feedback message */
.team-action-feedback {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(210px);
  background: rgba(30, 36, 43, 0.85);
  color: #f1f6f0;
  padding: 12px 20px;
  border-radius: 14px;
  border-left: 4px solid #6c81a1;
  font-family: 'Roboto', sans-serif;
  font-weight: bold;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
  z-index: 2000;
  opacity: 0;
  transform: translateX(210px) translateY(-20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 300px;
  overflow: hidden;
  pointer-events: none;
}

/* Border glow effect */
.team-action-feedback::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #6c81a1;
  box-shadow: 0 0 15px 2px rgba(108, 129, 161, 0.7);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.team-action-feedback.visible {
  opacity: 1;
  transform: translateX(210px) translateY(0);
  animation: feedback-pulse 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.team-action-feedback.visible::before {
  opacity: 1;
  animation: border-pulse 2s infinite alternate;
}

@keyframes feedback-pulse {
  0% { transform: translateX(210px) translateY(-20px) scale(0.95); }
  50% { transform: translateX(210px) translateY(0) scale(1.03); }
  100% { transform: translateX(210px) translateY(0) scale(1); }
}

@keyframes border-pulse {
  0% { box-shadow: 0 0 15px 2px rgba(108, 129, 161, 0.3); }
  100% { box-shadow: 0 0 20px 5px rgba(108, 129, 161, 0.7); }
}
.arrow-indicator {
  display: inline-block;
  margin-right: 5px;
  opacity: 0;
  transition: opacity 0.2s ease;
  font-size: 18px;
}

.arrow-active .arrow-indicator {
  opacity: 1;
}/* Team Chatbox styling */
#team-chat-container {
  position: fixed;
  top: 10px;
  left: 210px;
  width: 280px;
  max-height: 60vh;
  display: flex;
  flex-direction: column-reverse; /* Newest messages at top */
  align-items: flex-start;
  gap: 5px;
  overflow: hidden;
  z-index: 900;
  pointer-events: none; /* Allow clicking through */
  padding: 10px;
}
            
.team-chat-message {
  background-color: rgba(30, 36, 43, 0.85); /* Updated to match theme */
  color: #f1f6f0;
  border-left: 3px solid #6c81a1;
  padding: 8px 12px;
  border-radius: 8px; /* Slightly increased for consistency */
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  font-size: 14px;
  margin-bottom: 4px;
  text-align: left;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: translateX(0);
  animation: chat-slide-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: auto; /* Make messages clickable */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Slightly enhanced shadow */
  font-weight: bold;
}
            
.team-chat-message.fading {
  opacity: 0;
  transform: translateX(-30px); /* Reduced movement for subtlety */
  transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
            
.team-chat-message .sender {
  color: #a1b4d1; /* Updated to match theme's highlight color */
  font-weight: bolder;
  margin-right: 5px;
}
            
@keyframes chat-slide-in {
  from { 
    transform: translateX(30px); /* Reduced movement for subtlety */
    opacity: 0;
  }
  to { 
    transform: translateX(0);
    opacity: 1;
  }
}

/* Building UI Styles */
/* ==================== BUILDING CONTAINER STYLING ==================== */
#building-container {
  position: absolute;
  top: 395px;
  left: 285px;
  transform: translate(-50%, -50%);
  width: 550px;
  height: 350px;
  background: rgba(30, 36, 43);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  color: #f1f6f0;
  font-family: 'Roboto', sans-serif;
  transition: opacity 0.3s ease;
  display: none;
  z-index: 1000;
  --show-animation-duration: 0.5s;
  --hide-animation-duration: 0.5s;
  transform-origin: center;
}

/* When container is shown - exact match to crafting container */
#building-container.show {
  display: block;
  animation: container-appear var(--show-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#building-container:hover {
  opacity: 0.9 !important; /* Using !important as in the original */
}

@keyframes container-appear {
  from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
}

#building-container.hide {
  animation: container-disappear var(--hide-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes container-disappear {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
  to { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
}

/* Tabs styling - matching crafting container */
.tabs {
  display: flex;
  background: #1e242b;
  padding: 3px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  position: relative;
}

/* Main content area with two panels */
.building-content {
  display: flex;
  height: calc(100% - 70px);
}

/* Left: Buildings List */
.buildings-list {
  width: 40%;
  background: rgba(30, 36, 43);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #6c81a1 #2A303A;
  font-size: 14px;
}

.buildings-list::-webkit-scrollbar {
  width: 6px;
}

.buildings-list::-webkit-scrollbar-track {
  background: #303843;
  border-radius: 3px;
}

.buildings-list::-webkit-scrollbar-thumb {
  background-color: #6c81a1;
  border-radius: 3px;
}

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

.buildings-list li {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  margin: 4px 6px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.buildings-list li:hover,
.buildings-list li.active {
  background: #485667;
}

.buildings-list li:hover {
  transform: translateX(4px);
}

.buildings-list li.active {
  box-shadow: inset 0 0 0 2px rgba(108, 129, 161, 0.5);
}

.buildings-list li::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
              rgba(255, 255, 255, 0) 0%, 
              rgba(255, 255, 255, 0.1) 50%,
              rgba(255, 255, 255, 0) 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.buildings-list li:hover::after {
  transform: translateX(100%);
}

.buildings-list li img {
  width: 30px;
  height: 30px;
  margin-right: 8px;
  object-fit: contain;
}

.buildings-list .item-name {
  font-weight: bold;
}

.buildings-list .item-category {
  margin-left: auto;
  font-size: 12px;
  color: #a9a9a9;
  background: #1e242b;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Right: Building Details */
.building-details {
  width: 60%;
  padding: 10px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
}



.building-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 70px;
  background: #1e242b;
  border-radius: 8px;
  margin-bottom: 2px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.4s ease;
}

.building-content, .building-details, .building-preview {
  box-sizing: border-box;
}

.building-preview {
  min-height: 70px;
  max-height: 70px;
}

.building-preview:hover {
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4), 
              0 0 15px rgba(108, 129, 161, 0.3);
}

.building-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(108, 129, 161, 0.4) 0%,
    rgba(108, 129, 161, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.building-preview:hover::before {
  opacity: 1;
  animation: gentle-pulse 3s infinite alternate;
}

@keyframes gentle-pulse {
  0% { opacity: 0.2; }
  100% { opacity: 0.6; }
}

/* Matching the magical shimmer effect */
.building-preview::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.1) 40%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 60%,
    rgba(255, 255, 255, 0) 65%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
  transform: rotate(45deg);
}

/* Magical particles animation match */
.building-preview:hover {
  animation: emit-particles 3s infinite;
}

@keyframes emit-particles {
  0%, 100% { box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4), 
                         0 0 15px rgba(108, 129, 161, 0.3); }
  50% { box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4), 
                    0 0 20px rgba(108, 129, 161, 0.5); }
}

.building-preview img {
  max-width: 60px;
  max-height: 60px;
  object-fit: contain;
}

.building-preview:hover img {
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
  animation: subtle-float 3s infinite ease-in-out;
}

@keyframes subtle-float {
  0%, 100% { transform: scale(1.15) translateY(0px); }
  50% { transform: scale(1.15) translateY(-2px); }
}

#selected-building-name {
  color: #a1b4d1;
  margin: 0 0 0px 0;
  text-align: center;
  font-size: 18px;
}

#selected-building-description {
  color: #f1f6f0;
  margin-bottom: 8px;
  line-height: 1.3;
  flex-grow: 1;
  font-size: 13px;
  max-height: 70px;
}

#building-requirements {
  justify-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0px;
  font-weight: bolder;
}

#building-requirements .requirement {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 8px;
  padding: 2px;
  height: 52px;
  font-weight: bolder;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#building-requirements .requirement:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

#building-requirements .requirement img {
  width: 36px;
  height: 36px;
  transition: transform 0.3s ease;
}

#building-requirements .requirement:hover img {
  transform: scale(1.12);
}

#building-requirements .requirement:after {
  content: attr(data-count);
  display: block;
  font-weight: 900;
  font-size: 14px;
  color: #f1f6f0;
}

#building-requirements .requirement.insufficient:after {
  color: #b55945;
  font-weight: bolder;
}

#building-requirements .requirement.insufficient {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
  animation-delay: 0.2s;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-2px, 0, 0); }
  40%, 60% { transform: translate3d(2px, 0, 0); }
}

#build-button {
  background: linear-gradient(to bottom,#6c81a1, #536480);
  color: #f1f6f0;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-weight: 900;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 4px 0 #1e242b;
  margin-top: 5px;
  width: 100%;
  position: relative;  /* Needed for absolute positioning of pseudo-element */
  overflow: hidden;    /* Critical for containing the shine effect */
  z-index: 1;          /* Set base z-index */
}

#build-button:hover:not(:disabled) {
  background: linear-gradient(to bottom, #7c91b1, #6c81a1);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1e242b;
}

#build-button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1e242b;
}

#build-button:disabled {
  background: #414a56;
  color: #8a9199;
  cursor: not-allowed;
  box-shadow: 0 4px 0 #1e242b;
}

#build-button:not(:disabled)::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg) translateY(-100%);
  animation: button-shine 4s infinite;
  z-index: -1;  /* Ensure it's below button content but still visible */
}

@keyframes button-shine {
  0% { transform: rotate(30deg) translateY(-100%); }
  30% { transform: rotate(30deg) translateY(250%); }
  100% { transform: rotate(30deg) translateY(250%); }
}

/* Button press enhanced effect match */
#build-button:active:not(:disabled) {
  animation: button-press 0.3s forwards;
}

@keyframes button-press {
  0% { transform: translateY(-2px); }
  40% { transform: translateY(4px) scale(0.97); }
  100% { transform: translateY(2px); }
}

/* Action Bar Styles */
#action-bar-container {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 900;
  font-family: 'Roboto', sans-serif;
  pointer-events: none; /* Initially allow clicking through */
  display: none; /* Hidden by default */
}

#action-bar-trigger {
  width: 50px;
  height: 50px;
  background: rgba(30, 36, 43, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto; /* Make trigger clickable */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
  z-index: 920;
}

.trigger-icon {
  color: #f1f6f0;
  font-size: 20px;
  font-weight: bold;
  user-select: none;
}

#action-bar {
  position: absolute;
  top: 0;
  right: 60px;
  display: flex;
  flex-direction: row-reverse;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

/* Show action bar when hovering over trigger or the bar itself */
#action-bar-container:hover #action-bar {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
/* Keep action bar visible for a while after leaving container 
#action-bar-container:not(:hover) #action-bar {
  transition-delay: 1.5s; /* 1.5 second delay before closing */


/* Create a secondary hover target that extends the hover area */
#action-bar::before {
  content: '';
  position: absolute;
  top: -15px;
  right: -15px;
  bottom: -15px;
  left: -15px;
  z-index: -1;
}

#action-bar-container:hover #action-bar-trigger {
  background: rgba(48, 56, 67, 0.95);
  border-color: #fdd179;
}

.action-button {
  width: 45px;
  height: 45px;
  background: rgba(30, 36, 43, 0.85);
  border-radius: 50%;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.action-button:hover {
  background: rgba(48, 56, 67, 0.95);
  border-color: #fdd179;
  transform: translateY(-3px);
}

.action-icon {
  font-size: 18px;
  color: #f1f6f0;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tooltip {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 36, 43, 0.9);
  color: #f1f6f0;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(-50%) translateY(5px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.action-button:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Hide the action bar when certain UIs are open */


/* With these rules */
body.ui-open #action-bar {
  display: none;
}

body.ui-open #action-bar-trigger {
  background: rgba(181, 89, 69, 0.85); /* Red background to indicate "close" function */
  border-color: #fdd179;
}
body.ui-open #action-bar-trigger:hover {
  background: rgba(189, 85, 62, 0.95) !important; /* Red background to indicate "close" function */
  border-color: #fdd179;
}

body.ui-open #action-bar-trigger .trigger-icon {
  content: "✕"; /* Change icon to X when UIs are open */
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #action-bar-container {
    bottom: 170px;
  }
  
  .action-button {
    width: 40px;
    height: 40px;
    margin-right: 8px;
  }
  
  .action-icon {
    font-size: 16px;
  }
}

/* Active state for buttons */
.action-button.active {
  background: rgba(108, 129, 161, 0.6);
  border-color: #fdd179;
}

/* ==================== BIG MAP STYLING ==================== */
#big-map-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1500;
  display: none;
  pointer-events: auto;
}

#big-map-container.active {
  display: block;
}

#big-map-border {
  position: relative;
  padding: 20px;
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.7) 0%, rgba(101, 67, 33, 0.7) 25%, rgba(93, 58, 26, 0.7) 50%, rgba(101, 67, 33, 0.7) 75%, rgba(139, 69, 19, 0.7) 100%);
  border-radius: 15px;
  box-shadow: 
    0 0 0 4px rgba(61, 35, 20, 0.7),
    0 0 0 8px rgba(42, 24, 16, 0.7),
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

#big-map-border::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 2px solid rgba(139, 69, 19, 0.3);
  border-radius: 10px;
  pointer-events: none;
}

#big-map-canvas {
  display: block;
  border-radius: 8px;
  background: rgba(30, 36, 43, 0.35);
  transition: background 0.3s ease;
}

/* Hover effect - make map fully opaque */
#big-map-container:hover #big-map-canvas {
  background: rgba(30, 36, 43, 1);
}

#big-map-container:hover #big-map-border {
  background: linear-gradient(135deg, #8B4513 0%, #654321 25%, #5D3A1A 50%, #654321 75%, #8B4513 100%);
  box-shadow: 
    0 0 0 4px #3D2314,
    0 0 0 8px #2A1810,
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

#big-map-container:hover #big-map-border::before {
  border-color: rgba(139, 69, 19, 0.5);
}

/* Corner decorations */
#big-map-border .corner {
  position: absolute;
  width: 30px;
  height: 30px;
  background: #654321;
  border-radius: 50%;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.3);
}

#big-map-border .corner.top-left {
  top: -5px;
  left: -5px;
}

#big-map-border .corner.top-right {
  top: -5px;
  right: -5px;
}

#big-map-border .corner.bottom-left {
  bottom: -5px;
  left: -5px;
}

#big-map-border .corner.bottom-right {
  bottom: -5px;
  right: -5px;
}

/* ==================== LEADERBOARD CONTAINER STYLING ==================== */
#leaderboard-container {
  position: absolute;
  top: 175px;
  left: 220px;
  width: 300px;
  height: 500px;
  background: rgba(30, 36, 43, 0.95);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  color: #f1f6f0;
  font-family: 'Roboto', sans-serif;
  transition: opacity 0.3s ease;
  display: none;
  z-index: 1000;
  --show-animation-duration: 0.5s;
  --hide-animation-duration: 0.5s;
  transform-origin: right top;
  overflow: hidden;
}

/* When container is shown */
#leaderboard-container.show {
  display: block;
  animation: leaderboard-appear var(--show-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#leaderboard-container:hover {
  opacity: 0.95 !important;
}

@keyframes leaderboard-appear {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 0.95; }
}

#leaderboard-container.hide {
  animation: leaderboard-disappear var(--hide-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes leaderboard-disappear {
  from { transform: scale(1); opacity: 0.95; }
  to { transform: scale(0.9); opacity: 0; }
}

/* Header styling */
.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1e242b;
  padding: 10px 15px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.leaderboard-header h2 {
  color: #fdd179;
  margin: 0;
  font-size: 24px;
  animation: trophy-pulse 3s infinite;
}

@keyframes trophy-pulse {
  0%, 100% { transform: scale(1); text-shadow: 0 0 10px rgba(253, 209, 121, 0.5); }
  50% { transform: scale(1.05); text-shadow: 0 0 15px rgba(253, 209, 121, 0.8); }
}

/* Main content area */
.leaderboard-content {
  display: flex;
  flex-direction: column;
  height: calc(100% - 45px);
}

/* Top player section with special animation */
.top-player {
  padding: 5px;
  background: linear-gradient(135deg, rgba(108, 129, 161, 0.3), rgba(30, 36, 43, 0.5));
  text-align: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.top-player .crown {
  font-size: 24px;
  margin-bottom: 5px;
  animation: crown-float 3s ease-in-out infinite;
  display: block;
}

@keyframes crown-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}

.top-player .player-name {
  font-size: 18px;
  font-weight: bold;
  margin: 5px 0;
  text-shadow: 0 0 10px rgba(108, 129, 161, 0.8);
}

.top-player .player-score {
  font-size: 14px;
  opacity: 0.8;
  font-weight: 900;
}

/* Background effect for top player */
.top-player::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(108, 129, 161, 0.4) 0%,
    rgba(108, 129, 161, 0) 70%
  );
  opacity: 0.5;
  animation: pulse-background 3s infinite alternate;
  pointer-events: none;
}

@keyframes pulse-background {
  0% { opacity: 0.3; }
  100% { opacity: 0.7; }
}

/* Shine effect for top player */
.top-player::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.1) 40%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 60%,
    rgba(255, 255, 255, 0) 65%,
    transparent 100%
  );
  pointer-events: none;
  transform: rotate(45deg);
  animation: shine-effect 4s infinite;
}

@keyframes shine-effect {
  0% { transform: rotate(45deg) translateY(-100%); }
  25% { transform: rotate(45deg) translateY(200%); }
  100% { transform: rotate(45deg) translateY(200%); }
}

/* Leaderboard list styling */
.leaderboard-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 5px;
  scrollbar-width: thin;
  scrollbar-color: #6c81a1 #2A303A;
}

.leaderboard-list::-webkit-scrollbar {
  width: 6px;
}

.leaderboard-list::-webkit-scrollbar-track {
  background: #303843;
  border-radius: 3px;
}

.leaderboard-list::-webkit-scrollbar-thumb {
  background-color: #6c81a1;
  border-radius: 3px;
}

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

.leaderboard-list li {
  display: flex;
  align-items: center;
  margin: 5px 0;
  padding: 10px;
  background: rgba(48, 56, 67, 0.7);
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  font-weight:bold;
}

.leaderboard-list li:hover {
  transform: translateX(4px);
  background: rgba(48, 56, 67, 0.9);
}

.leaderboard-list li.current-player {
  background: rgba(108, 129, 161, 0.3);
  box-shadow: 0 0 0 1px rgba(108, 129, 161, 0.5);
}

.leaderboard-list .rank {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(108, 129, 161, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  margin-right: 10px;
}

.leaderboard-list .player-info {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-list .player-name {
  font-weight: bold;
  margin-bottom: 2px;
}

.leaderboard-list .player-stats {
  font-size: 12px;
  opacity: 0.8;
  margin: 0;                 /* Remove any default margins */
  padding: 0; 
  line-height: 1.2;              /* Remove any default padding */
  vertical-align: middle;
}

.leaderboard-list .skull-icon {
  font-size: 18px;
  margin-left: 5px;
  animation: skull-pulse 2s infinite;
}

@keyframes skull-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Player stats section */
.player-stats {
  padding: 10px 20px;
  background: #1e242b;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  min-height: 56px;
}

.player-stats .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(108, 129, 161, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  font-size: 18px;
}

.player-stats .stats-info {
  flex-grow: 1;
}

.player-stats .player-name {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 2px;
}

.player-stats .stats-row {
  display: flex;
  font-size: 14px;
  opacity: 0.8;
}

.player-stats .stat {
  display: flex;
  align-items: center;
  margin-right: 10px;
  font-weight: 900;
}

.player-stats .stat-icon {
  margin-right: 5px;
}

/* Rank colors */
.rank-1 { background: rgba(253, 209, 121, 0.4); color: #fdd179; }
.rank-2 { background: rgba(164, 197, 175, 0.4); color: #a4c5af; }
.rank-3 { background: rgba(150, 169, 193, 0.4); color: #96a9c1; }

/* Special styling for top 3 player rows */
.player-rank-1 {
  background: rgba(253, 209, 121, 0.4); color: #fdd179;
  
}

.player-rank-2 {
  background: rgba(164, 197, 175, 0.4); color: #a4c5af;;
}

.player-rank-3 {
  background: rgba(150, 169, 193, 0.4); color: #96a9c1;
}

/* Settings Styling */
/* Settings Container - matched to building-container */
#settings-container {
  position: fixed; 
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  height: 500px;
  background: rgba(30, 36, 43);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  color: #f1f6f0;
  font-family: 'Roboto', sans-serif;
  transition: opacity 0.3s ease;
  display: none;
  z-index: 9999;
  --show-animation-duration: 0.5s;
  --hide-animation-duration: 0.5s;
  transform-origin: center;
  overflow: hidden; /* Ensure nothing extends beyond the container */
}

/* When container is shown - exact match to building container */
#settings-container.show {
  display: block;
  animation: container-appear var(--show-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#settings-container:hover {
  opacity: 1 !important; /* Make MORE opaque on hover, not less */
}

@keyframes container-appear {
  from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
}

#settings-container.hide {
  animation: container-disappear var(--hide-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes container-disappear {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
  to { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
}

/* Settings Header */
.settings-header {
  background: #1e242b;
  padding: 10px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  text-align: center;
}

.settings-header h2 {
  margin: 0;
  font-size: 24px;
  color: #a1b4d1;
}

/* Settings Content */
.settings-content {
  padding: 15px;
  height: calc(100% - 47px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #6c81a1 #2A303A;
  box-sizing: border-box; /* Ensure padding is included in height calculations */
  background: rgba(30, 36, 43); /* Match the container background */
}

.settings-content::-webkit-scrollbar {
  width: 6px;
}

.settings-content::-webkit-scrollbar-track {
  background: #303843;
  border-radius: 3px;
}

.settings-content::-webkit-scrollbar-thumb {
  background-color: #6c81a1;
  border-radius: 3px;
}

/* Settings Section */
.settings-section {
  margin-bottom: 20px;
  background: #272e38;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.settings-section h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #a1b4d1;
  position: relative;
  display: inline-block;
}

.settings-section h3::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #6c81a1, transparent);
}

/* Setting Row */
.setting-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.setting-row:hover {
  background: #3a4250;
  transform: translateX(4px);
}

.setting-row label {
  width: 100px;
  font-weight: bold;
  font-size: 16px;
}

/* Slider Container */
.slider-container {
  flex: 1;
  display: flex;
  align-items: center;
}

.slider {
  flex: 1;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: #1e242b;
  border-radius: 5px;
  outline: none;
  margin-right: 10px;
  transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6c81a1;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6c81a1;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.slider:hover::-webkit-slider-thumb {
  transform: scale(1.2);
  background: #7c91b1;
  box-shadow: 0 0 10px rgba(108, 129, 161, 0.8);
}

.slider:hover::-moz-range-thumb {
  transform: scale(1.2);
  background: #7c91b1;
  box-shadow: 0 0 10px rgba(108, 129, 161, 0.8);
}

.slider:active::-webkit-slider-thumb {
  transform: scale(1.4);
}

.slider:active::-moz-range-thumb {
  transform: scale(1.4);
}

.slider-value {
  width: 45px;
  text-align: right;
  font-weight: bold;
  color: #a1b4d1;
}

/* Toggle Switch */
.toggle-container {
  display: flex;
  align-items: center;
}

.toggle-input {
  height: 0;
  width: 0;
  visibility: hidden;
  position: absolute;
}

.toggle-label {
  cursor: pointer;
  width: 50px;
  height: 25px;
  background: #1e242b;
  border-radius: 25px;
  position: relative;
  transition: background-color 0.3s;
}

.toggle-label:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  background: #f1f6f0;
  border-radius: 50%;
  transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.toggle-input:checked + .toggle-label {
  background: #6c81a1;
}

.toggle-input:checked + .toggle-label:after {
  left: calc(100% - 3px);
  transform: translateX(-100%);
}

.toggle-label:active:after {
  width: 26px;
}

.toggle-input:checked + .toggle-label:hover {
  background: #7c91b1;
  box-shadow: 0 0 10px rgba(108, 129, 161, 0.5);
}

.toggle-label:hover {
  background: #303843;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
/* Language Container */
.language-container {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

/* Language Select */
.language-select {
  background: #1e242b;
  color: #f1f6f0;
  border: 2px solid #303843;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  outline: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 120px;
  position: relative;
}

.language-select:hover {
  background: #303843;
  border-color: #6c81a1;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.language-select:focus {
  border-color: #6c81a1;
  box-shadow: 0 0 0 3px rgba(108, 129, 161, 0.3);
}

.language-select option {
  background: #1e242b;
  color: #f1f6f0;
  padding: 8px;
}

.language-select option:hover {
  background: #6c81a1;
}
/* Keybinds */
.keybind-container {
  display: flex;
  flex: 1;
  justify-content: flex-end; /* Aligns all keybinds to the right */
}

.keybind-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.keybind-row {
  display: flex;
}

.keybind-key {
  width: 36px;
  height: 36px;
  background: #1e242b;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3px;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 3px 0 #1a1f25;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.keybind-key:hover {
  background: #303843;
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #1a1f25;
}

.keybind-key:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1a1f25;
}

.keybind-key.listening {
  background: #6c81a1;
  color: #f1f6f0;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(108, 129, 161, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(108, 129, 161, 0); }
  100% { box-shadow: 0 0 0 0 rgba(108, 129, 161, 0); }
}

.keybind-key::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 45%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 55%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.keybind-key:hover::before {
  transform: translateX(100%);
}

/* Buttons Section */
.buttons-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.settings-button {
  background: #1e242b;
  color: #f1f6f0;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 0 #1a1f25;
  position: relative;
  overflow: hidden;
}

.settings-button:hover {
  background: #303843;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1a1f25;
}

.settings-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1a1f25;
}

.settings-button.primary {
  background: linear-gradient(to bottom, #6c81a1, #536480);
}

.settings-button.primary:hover {
  background: linear-gradient(to bottom, #7c91b1, #6c81a1);
}

.settings-button.primary:active {
  background: linear-gradient(to bottom, #536480, #6c81a1);
}

.settings-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 45%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 55%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.settings-button:hover::before {
  transform: translateX(100%);
}

/* Last settings section shouldn't have a bottom margin */
.settings-section:last-of-type {
  margin-bottom: 0;
}

/* Make the buttons section stick to the bottom if needed */
#buttons-section {
  margin-top: auto;
  margin-bottom: 0;
}

/* Tutorial Container */
/* Tutorial Container */
#tutorial-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  font-family: 'Roboto', sans-serif;
  user-select: none;
  display: none;
}

/* Tutorial Elements */
.tutorial-element {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tutorial-label {
  background-color: #2c3137;
  padding: 8px 15px;
  border-radius: 6px;
  font-weight: 800;
  margin-bottom: 12px;
  font-size: 14px;
  color: #ffffff;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* Positioning - adjusted as requested */
#movement-tutorial {
  left: 185px;
  top: 28%; /* Moved up */
}

#interact-tutorial {
  right: 120px;
  top: 35%;
}

#attack-tutorial {
  right: 120px;
  top: 70%;
}

#selection-tutorial {
  left: 185px;
  bottom: 180px; /* Moved down */
}

#actionbar-tutorial {
  top: 70px; /* Positioned just below the action menu button */
  right: 20px;
}

#hotbar-tutorial {
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
}

#close-tutorial {
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* Keys Styling - Back to dark style from first iteration */
.key {
  width: 55px;
  height: 55px;
  background: #303843;
  box-shadow: 0 4px 0 #1e242b, 0 6px 10px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: 900;
  color: #f1f6f0;
  margin: 5px;
  position: relative;
  overflow: hidden;
}

.key-w::after, .key-a::after, .key-s::after, .key-d::after, .key-e::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(108, 129, 161, 0.4);
  opacity: 0;
  border-radius: 8px;
}

.wasd-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.key-row {
  display: flex;
}

.key-esc {
  width: 45px;
  height: 45px;
  font-size: 14px;
  border-radius: 6px;
}

.close-label {
  font-size: 18px;
  font-weight: 800;
  color: #f1f6f0;
  margin-left: 15px;
  background-color: #2c3137;
  padding: 8px 12px;
  border-radius: 6px;
  letter-spacing: 1px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* Mouse Styling */
.mouse-container {
  perspective: 400px;
}

.mouse-outline {
  width: 40px;
  height: 70px;
  position: relative;
  transform-style: preserve-3d;
}

.mouse-button {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: #303843;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border: 2px solid #6c81a1;
  box-sizing: border-box;
  z-index: 2;
}

.mouse-body {
  position: absolute;
  top: 40%;
  left: 0;
  width: 100%;
  height: 60%;
  background: #1e242b;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  border: 2px solid #6c81a1;
  box-sizing: border-box;
}

/* Scroll Bar */
.number-keys {
  background: #313c4a;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

.scrollbar {
  width: 35px;
  height: 70px;
  background: #1e242b;
  border-radius: 17.5px;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
  margin-top: 5px;
}

.scrollbar-handle {
  position: absolute;
  width: 100%;
  height: 30px;
  background: #8da2b7;
  border-radius: 17.5px;
  top: 20px;
}

/* Hotbar Arrow */
.curved-arrow {
  position: relative;
  width: 40px;
  height: 40px;
}

.curved-arrow.down::before {
  content: '';
  position: absolute;
  width: 30px;
  height: 40px;
  border: 4px solid #a1b4d1;
  border-color: transparent transparent #a1b4d1 transparent;
  border-radius: 0 0 50% 50%;
}

.curved-arrow.down::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top: 8px solid #a1b4d1;
}

/* Animations */
@keyframes pressKey {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); box-shadow: 0 1px 0 #1e242b, 0 3px 5px rgba(0, 0, 0, 0.3); }
}

@keyframes glowKey {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes clickMouse {
  0%, 100% { background: #303843; }
  50% { background: #6c81a1; }
}

@keyframes moveScrollbar {
  0% { top: 5px; }
  50% { top: 35px; }
  100% { top: 5px; }
}

@keyframes pulseArrow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

@keyframes labelPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Apply animations */
.key-w {
  animation: pressKey 2s infinite 0.1s;
}
.key-w::after {
  animation: glowKey 2s infinite 0.1s;
}

.key-a {
  animation: pressKey 2s infinite 0.6s;
}
.key-a::after {
  animation: glowKey 2s infinite 0.6s;
}

.key-s {
  animation: pressKey 2s infinite 0.9s;
}
.key-s::after {
  animation: glowKey 2s infinite 0.9s;
}

.key-d {
  animation: pressKey 2s infinite 1.2s;
}
.key-d::after {
  animation: glowKey 2s infinite 1.2s;
}

.key-e {
  animation: pressKey 2.5s infinite;
}
.key-e::after {
  animation: glowKey 2.5s infinite;
}

.mouse-button {
  animation: clickMouse 2s infinite;
}

.scrollbar-handle {
  animation: moveScrollbar 4s infinite;
}

.curved-arrow.down::before,
.curved-arrow.down::after {
  animation: pulseArrow 2s infinite;
}

#actionbar-tutorial .tutorial-label {
  animation: labelPulse 2s infinite;
}

/* ==================== STATUE CONTAINER STYLING ==================== */
#statue-container {
  position: absolute;
  top: 395px;
  left: 285px;
  transform: translate(-50%, -50%);
  width: 320px;
  height: auto;
  background: rgba(30, 36, 43);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  color: #f1f6f0;
  font-family: 'Roboto', sans-serif;
  transition: opacity 0.3s ease;
  display: none;
  z-index: 1000;
  --show-animation-duration: 0.5s;
  --hide-animation-duration: 0.5s;
  transform-origin: center;
}

#statue-container.show {
  display: block;
  animation: container-appear var(--show-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#statue-container:hover {
  opacity: 0.9 !important;
}

#statue-container.hide {
  animation: container-disappear var(--hide-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes container-appear {
  from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
}

@keyframes container-disappear {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
  to { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
}

/* Content styling */
.statue-content {
  padding: 15px;
}

/* Upgrade Requirements Section */
.upgrade-requirements {
  background: #1e242b;
  border-radius: 8px;
  padding: 0px;
  margin-bottom: 12px;
}


.requirement-items {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 36, 43, 0.5);
  padding: 5px 10px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.requirement-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.requirement-item img {
  width: 20px;
  height: 20px;
}

.requirement-item span {
  font-weight: bold;
  font-size: 14px;
  color: #f1f6f0;
}

.requirement-item span.complete {
  color: #6fb56f;
}

.requirement-item span.incomplete {
  color: #b55945;
}

/* Combine Progress Section */
.combine-progress {
  background: #1e242b;
  border-radius: 8px;
  padding: 0px;
  margin-bottom: 15px;
}


.combine-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(30, 36, 43, 0.5);
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.combine-display.ready {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 155, 61, 0); }
  50% { box-shadow: 0 0 10px 2px rgba(255, 155, 61, 0.5); }
}

.combine-display img {
  width: 24px;
  height: 24px;
}

.combine-display span {
  font-weight: bold;
  font-size: 16px;
  color: #f1f6f0;
}

/* Statue Action Buttons */
.statue-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.statue-action-button {
  background: linear-gradient(to bottom, #6c81a1, #536480);
  color: #f1f6f0;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-weight: 900;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 4px 0 #1e242b;
  position: relative;
  overflow: hidden;
  z-index: 1;
  width: 100%;
}

.statue-action-button:hover:not(:disabled) {
  background: linear-gradient(to bottom, #7c91b1, #6c81a1);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1e242b;
}

.statue-action-button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #1e242b;
  animation: button-press 0.3s forwards;
}

.statue-action-button:disabled {
  background: #414a56;
  color: #8a9199;
  cursor: not-allowed;
  box-shadow: 0 4px 0 #1e242b;
}

/* Special colors for each button */
#upgrade-button:not(:disabled) {
  background: linear-gradient(to bottom, #7d6fa1, #5f5280);
}

#upgrade-button:hover:not(:disabled) {
  background: linear-gradient(to bottom, #8d7fb1, #6f6290);
}

#combine-button:not(:disabled) {
  background: linear-gradient(to bottom, #a17d6c, #806053);
}

#combine-button:hover:not(:disabled) {
  background: linear-gradient(to bottom, #b18d7c, #907063);
}

#sacrifice-button:not(:disabled) {
  background: linear-gradient(to bottom, #a16c6c, #805353);
}

#sacrifice-button:hover:not(:disabled) {
  background: linear-gradient(to bottom, #b17c7c, #906363);
}

/* Button shine effect */
.statue-action-button:not(:disabled)::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg) translateY(-100%);
  animation: button-shine 4s infinite;
  z-index: -1;
}

@keyframes button-shine {
  0% { transform: rotate(30deg) translateY(-100%); }
  30% { transform: rotate(30deg) translateY(250%); }
  100% { transform: rotate(30deg) translateY(250%); }
}

@keyframes button-press {
  0% { transform: translateY(-2px); }
  40% { transform: translateY(4px) scale(0.97); }
  100% { transform: translateY(2px); }
}
#customize-appearance {
    background: linear-gradient(to bottom, #536480, #414a56);
    color: #f1f6f0;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 #1e242b;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#customize-appearance:hover {
    background: linear-gradient(to bottom, #6c81a1, #536480);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #1e242b;
}

#customize-appearance:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #1e242b;
}


/* leaderboard demo landing page @tuanz376*/
#leaderboard-demo {
  position: fixed;
  bottom: 20px;
  left: 320px;
  z-index: 100;
}
#leaderboard-button {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(30, 36, 43, 0.7);
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(70, 90, 120, 0.3);
  transition: all 0.3s ease;
  width: 70px;
  height: 70px;
  text-decoration: none;
}
#leaderboard-button img {
  width: 50px;
  height: 50px;
}

/* Leaderboard Modal (independent from settings) */
.leaderboard-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 400px;
  max-width: 95vw;
  height: 500px;
  max-height: 90vh;
  transform: translate(-50%, -50%);
  background: rgba(30, 36, 43, 0.98);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  color: #f1f6f0;
  font-family: 'Roboto', sans-serif;
  z-index: 2001;
  display: none;
  flex-direction: column;
  --show-animation-duration: 0.5s;
  --hide-animation-duration: 0.5s;
  overflow: hidden;
  opacity: 0.85;
}

.leaderboard-modal.show {
  display: block;
  animation: container-appear var(--show-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.leaderboard-modal.hide {
  animation: container-disappear var(--hide-animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Special leaderboard header for landing modal */
.leaderboard-modal .leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e242b;
  padding: 18px 0 12px 0;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  box-shadow: 0 2px 12px 0 rgba(253, 209, 121, 0.08);
  position: relative;
  z-index: 1;
}

.leaderboard-modal .leaderboard-header .trophy-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 8px #fdd179cc);
  animation: trophy-glow 2.5s infinite alternate;
}

.leaderboard-modal .leaderboard-header .leaderboard-title,
.leaderboard-modal .leaderboard-header h2 {
  font-size: 28px;
  font-weight: 900;
  color: #fdd179;
  letter-spacing: normal;
  text-shadow: 0 0 12px #fdd17955, 0 2px 8px #1e242b;
  margin-left: 8px;
  animation: leaderboard-title-glow 2.5s infinite alternate;
}

@keyframes trophy-glow {
  0% { filter: drop-shadow(0 0 8px #fdd179cc); }
  100% { filter: drop-shadow(0 0 18px #fdd179); }
}
@keyframes leaderboard-title-glow {
  0% { text-shadow: 0 0 12px #fdd17955, 0 2px 8px #1e242b; }
  100% { text-shadow: 0 0 24px #fdd179cc, 0 2px 12px #1e242b; }
}

.leaderboard-modal .settings-content {
  padding: 0;
  height: auto;
}

.leaderboard-modal .leaderboard-list {
  max-height: 340px;
  overflow-y: auto;
  padding: 10px 0;
}

.leaderboard-modal .leaderboard-list ul {
  list-style: none;
  margin: 0;
  padding: 0 14px;
}

.leaderboard-modal .leaderboard-list li {
  display: flex;
  align-items: center;
  margin-bottom: 1px;
  padding: 2px 4px;
  background: rgba(48, 56, 67, 0.7);
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.2s;
}

.leaderboard-modal .leaderboard-list li.player-rank-1 {
  background: rgba(253, 209, 121, 0.25);
  color: #fdd179;
}
.leaderboard-modal .leaderboard-list li.player-rank-2 {
  background: rgba(164, 197, 175, 0.25);
  color: #a4c5af;
}
.leaderboard-modal .leaderboard-list li.player-rank-3 {
  background: rgba(150, 169, 193, 0.25);
  color: #96a9c1;
}

.leaderboard-modal .rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(108, 129, 161, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  margin-right: 12px;
  font-size: 18px;
}

.leaderboard-modal .player-info {
  flex: 1;
  overflow: hidden;
}

.leaderboard-modal .player-name {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 2px;
  display: block;
}

.leaderboard-modal .player-stats {
  font-size: 13px;
  opacity: 0.85 !important;
}

.leaderboard-modal .skull-icon {
  font-size: 16px;
  margin-left: 4px;
}
.leaderboard-modal:hover {
  opacity: 1 !important;
}
@keyframes container-appear {
  from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
}
@keyframes container-disappear {
  from { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
  to { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
}
.leaderboard-modal .leaderboard-header-special {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e242b;
  padding: 10px; /* Match settings header */
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  min-height: 47px; /* Match settings header height */
  box-shadow: 0 2px 12px 0 rgba(253, 209, 121, 0.08);
  position: relative;
  z-index: 1;
  transition: padding 0.2s, font-size 0.2s;
}

.leaderboard-modal .leaderboard-header-special .leaderboard-title {
  font-size: 24px; /* Match settings header */
  font-weight: 900;
  color: #fdd179;
  letter-spacing: normal;
  text-shadow: 0 0 12px #fdd17955, 0 2px 8px #1e242b;
  margin-left: 8px;
  animation: leaderboard-title-glow 2.5s infinite alternate;
  transition: font-size 0.2s;
}

.leaderboard-modal .leaderboard-header-special .trophy-icon {
  font-size: 24px;
  margin-right: 8px;
}
.current-user {
  outline: 2px solid #fdd179;
  background: #232b36 !important;
}
#leaderboard-user-info {
  background: #232b36;
  color: #fdd179;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  border-top: 1px solid #303843;
  padding: 12px 0 10px 0;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  margin-top: 0;
  display: none;
}
/* On hover: increase size, then return to normal */
.leaderboard-modal .leaderboard-header-special:hover {
  padding: 10px; /* No grow on hover */
}

.leaderboard-modal .leaderboard-header-special:hover .leaderboard-title {
  font-size: 24px; /* No grow on hover */
}
/* Animated "separating" effect for leaderboard header */
.animated-leaderboard-title span {
  display: inline-block;
  transition: transform 1s, letter-spacing 1s;
  will-change: transform, letter-spacing;
  /* Optional: for a little bounce */
}

.animated-leaderboard-title.separate span {
  animation: leaderboard-separate 0.8s cubic-bezier(0.4,2,0.4,1) forwards;
}

@keyframes leaderboard-separate {
  0%   { transform: translateY(0) scale(1); letter-spacing: normal; }
  40%  { transform: translateY(-8px) scale(1.2); letter-spacing: 0.3em; }
  60%  { transform: translateY(-8px) scale(1.2); letter-spacing: 0.3em; }
  100% { transform: translateY(0) scale(1); letter-spacing: normal; }
}

/* =============================================================================
   Add to index.css — OAuth button styles
   ============================================================================= */

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.15s ease;
  white-space: nowrap;
}

.oauth-btn:hover {
  filter: brightness(1.1);
}

.oauth-btn:active {
  filter: brightness(0.95);
}

/* Discord brand colour — #5865F2, white text */
.oauth-btn--discord {
  background: #5865F2;
  color: #ffffff;
}

.oauth-btn--discord img {
  /* Discord mark is already white SVG — no filter needed */
  flex-shrink: 0;
}

#legal-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  padding: 6px 16px;
  pointer-events: none;
  z-index: 1;
  font-family: 'Roboto', sans-serif;
}
#legal-footer a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  pointer-events: all;
}
#legal-footer a:hover {
  color: rgba(255,255,255,0.6);
}
.legal-sep {
  margin: 0 6px;
  color: rgba(255,255,255,0.15);
}