#achievement-container {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: calc(100% - 40px);
  max-width: 900px;
  gap: 10px;
  z-index: 1000;
  max-height: 80vh;
  overflow: auto;
  padding: 10px;
  box-sizing: border-box;
}

#achievement-list {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  flex-direction: column;
  gap: 10px;
  width: 80%;
  max-width: 600px;
  max-height: 80vh;
  background-color: rgba(0, 0, 0, 0.9);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  z-index: 1001;
  overflow-y: auto;
  font-family: 'Nunito', sans-serif;
}

#achievement-list::-webkit-scrollbar {
  width: 0px;
}

#achievement-list::-webkit-scrollbar-track {
  background: #333;
  border-radius: 4px;
}

#achievement-list::-webkit-scrollbar-thumb {
  background: #666;
  border-radius: 4px;
}

#achievement-list::-webkit-scrollbar-thumb:hover {
  background: #888;
}

#achievement-container.open #achievement-list {
  display: flex;
}

.achievement {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 300px;
  opacity: 0;
  transform: translateY(-20px);
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  position: relative;
  overflow: hidden;
  font-family: 'Nunito', sans-serif;
}

.achievement.show {
  transform: translateY(0);
  opacity: 1;
}

.achievement img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.achievement-letter {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background-color: white;
  color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  font-weight: bold;
  font-family: 'Nunito', sans-serif;
}

.achievement-text {
  flex: 1;
}

.achievement h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.achievement p {
  margin: 0;
  font-size: 14px;
  color: #eee;
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 0 0 8px 8px;
}

.progress {
  height: 100%;
  width: 100%;
  background-color: #4CAF50;
  transition: width linear;
}

#achievement-list h2 {
  color: white;
  margin-bottom: 15px;
  font-size: 24px;
  font-weight: 700;
}

#achievement-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#achievement-list li {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#achievement-list li:last-child {
  border-bottom: none;
}

#achievement-list li span {
  display: block;
  font-size: 16px;
  color: #ccc;
}

#achievement-list button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
  font-size: 16px;
  transition: background-color 0.2s ease;
}

#achievement-list button:hover {
  background-color: #367c39;
}

.achievement-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.achievement-list-item .achievement-letter {
  width: 30px;
  height: 30px;
  font-size: 14px;
  border-radius: 3px;
}

.achievement-list-item span {
  flex-grow: 1;
  margin-left: 10px;
}

.unlocked {
  color: gold;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  overflow-y: auto;
  max-height: 40vh;
  padding: 10px;
}

.achievement-grid-item {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: background-color 0.3s ease;
}

.achievement-grid-item:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.achievement-grid-item img,
.achievement-grid-item .achievement-letter {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
}

.achievement-grid-item h3 {
  font-size: 16px;
  margin: 5px 0;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.achievement-grid-item p {
  font-size: 14px;
  color: #eee;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.achievement-grid-item.unlocked {
  border: 2px solid gold;
  box-shadow: 0 0 8px gold;
}

.achievement-grid-item .achievement-text {
  flex: 1;
  text-align: center;
}

.achievement-grid-item.locked .achievement-text h3,
.achievement-grid-item.locked .achievement-text p {
  color: transparent;
  background-color: #333;
  border-radius: 5px;
  margin: 3px 0;
}

.achievement-grid-item.locked img {
  opacity: 0;
}

#cat-image {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 100px;
  height: 100px;
  cursor: pointer;
  z-index: 999;
}

#about-tab {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 0 0 5px 5px;
  cursor: pointer;
  z-index: 1002;
  transition: background-color 0.3s ease;
  font-family: 'Nunito', sans-serif;
}

#about-tab:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

#about-content {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -110%);
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  width: 300px;
  text-align: center;
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  font-family: 'Nunito', sans-serif;
}

#about-content.open {
  transform: translate(-50%, 50px);
}

#about-content p a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
}

#fade-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 1003;
  pointer-events: none;
  transition: background-color 1s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
}

#fade-overlay.active {
  background-color: rgba(0, 0, 0, 1);
  pointer-events: auto;
  visibility: visible;
}

#death-text {
  font-family: 'Courier New', monospace;
  font-size: 24px;
  color: white;
  text-align: center;
  white-space: pre-wrap;
  opacity: 0;
}

#death-text.active {
  opacity: 1;
}

#click-counter {
  display: none;
}

#key-image-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    background-color: black;
    border: 2px solid #555;
    box-sizing: border-box;
    z-index: 1005;
}

#key-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#roll-tab {
    position: fixed;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1002;
    transition: background-color 0.3s ease;
    font-family: 'Arial', sans-serif;
    display: none; 
    font-size: 30px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    border: none;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    width: 200px;
    height: 80px;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    background-color: gray;
    font-family: 'Space Grotesk', sans-serif;
    border-radius: 50px;
}

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;700&display=swap');

#roll-result {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1003;
    width: 200px;
    text-align: center;
    font-family: 'Nunito', sans-serif;
    display: none; 
    font-size: 20px;
    font-weight: bold;
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

.common {
    background-image: linear-gradient(to right, gray, gray);
}

.uncommon {
    background-image: linear-gradient(to right, darkgreen, darkgreen);
}

.rare {
    background-image: linear-gradient(to right, green, green);
}

.superrare {
    background-image: linear-gradient(to right, blue, purple);
}

.epic {
    background-image: linear-gradient(to right, purple, black);
}

.mythic {
    background-image: linear-gradient(to right, red, black);
}

.legendary {
    background-image: linear-gradient(to right, gold, yellow);
}

.chromatic {
    background-image: linear-gradient(to right, yellow, pink);
}

.godly {
    background-image: linear-gradient(to right, lightyellow, white);
}

.hypercharged {
  background-image: linear-gradient(to right, lightblue, purple);
}

#roll-cooldown-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50px;
    overflow: hidden;
    z-index: 0;
    display: none;
    pointer-events: none;
}

#roll-cooldown-bar {
    width: 100%;
    height: 100%;
    background-color: #4286f4;
    transition: width 0.1s linear;
    pointer-events: none;
}

#roll-luck {
    position: fixed;
    bottom: 10%;
    left: 60%; 
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1002;
    font-family: 'Nunito', sans-serif;
    display: none;
    pointer-events: none; 
}

#luck-display {
  font-size: 12px;
  margin-top: 5px;
  color: #ddd;
}

#roll-tab:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

#roll-probability {
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    z-index: 1004;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    display: none;
}

#reset-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1004;
    width: 300px;
    text-align: center;
    font-family: 'Nunito', sans-serif;
    display: none;
}

#reset-container p {
    margin-bottom: 15px;
}

#reset-container button {
    background-color: #dc3545; 
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

#reset-container button:hover {
    background-color: #c82333; 
}

#reset-container button:first-of-type {
    margin-right: 10px;
}
