/* Professional Market.css - Using site's gold/beige color scheme */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.mytitle {
  font-family: "Prata", serif;
  font-size: 3rem;
  font-weight: normal;
  text-align: center;
  background: linear-gradient(135deg, #d29b61 0%, #e4d5b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 2rem 0 3rem;
  padding: 1rem 0;
  letter-spacing: 3px;
  text-transform: uppercase;
}

#switch-version {
  text-align: center;
  margin: 2rem 0;
}

#switch-version input[type="submit"] {
  padding: 14px 40px;
  background: linear-gradient(135deg, #d29b61 0%, #e4d5b8 100%);
  border: none;
  border-radius: 8px;
  color: #1a1a1a;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.05rem;
  box-shadow: 0 4px 15px rgba(210, 155, 97, 0.3);
  letter-spacing: 1px;
  font-family: "Roboto", sans-serif;
}

#switch-version input[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(210, 155, 97, 0.5);
  background: linear-gradient(135deg, #e4d5b8 0%, #d29b61 100%);
}

.shop {
  background: linear-gradient(135deg, #2a2520 0%, #1a1a1a 100%);
  border: 1px solid rgba(210, 155, 97, 0.2);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: visible; /* Changed to visible to allow tooltips to show outside */
}

.shop::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d29b61 0%, #e4d5b8 100%);
}

.shop:hover {
  transform: translateY(-5px);
  border-color: rgba(210, 155, 97, 0.4);
  box-shadow: 0 15px 35px rgba(210, 155, 97, 0.2);
}

.info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(210, 155, 97, 0.15);
  position: relative;
}

.player {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 3px solid #d29b61;
  box-shadow: 0 4px 15px rgba(210, 155, 97, 0.3);
  flex-shrink: 0;
}

.left {
  flex: 1;
}

.player-name {
  font-family: "Prata", serif;
  font-size: 1.5rem;
  font-weight: normal;
  color: #e4d5b8;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.comment {
  font-size: 0.95rem;
  color: #e4d5b8;
  opacity: 0.7;
  line-height: 1.6;
}

.shop-num {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Prata", serif;
  font-size: 2.5rem;
  font-weight: normal;
  color: #d29b61;
  opacity: 0.3;
}

.message {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: rgba(210, 155, 97, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(210, 155, 97, 0.1);
}

.message form {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.message textarea {
  flex: 1;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(210, 155, 97, 0.2);
  border-radius: 8px;
  color: #e4d5b8;
  font-size: 0.95rem;
  resize: none;
  min-height: 45px;
  font-family: "Roboto", sans-serif;
}

.message textarea:focus {
  outline: none;
  border-color: #d29b61;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 15px rgba(210, 155, 97, 0.2);
}

.message input[type="submit"] {
  padding: 12px 24px;
  background: linear-gradient(135deg, #d29b61 0%, #e4d5b8 100%);
  border: none;
  border-radius: 8px;
  color: #1a1a1a;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-family: "Roboto", sans-serif;
}

.message input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(210, 155, 97, 0.4);
  background: linear-gradient(135deg, #e4d5b8 0%, #d29b61 100%);
}

.atr {
  display: flex;
  gap: 2rem;
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(210, 155, 97, 0.05);
  border-radius: 8px;
}

.atr a {
  font-size: 0.9rem;
  color: #e4d5b8;
  opacity: 0.8;
  font-weight: 500;
}

.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  overflow: visible; /* Added to allow tooltips to overflow */
}

.item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(210, 155, 97, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: visible; /* Changed to visible to allow tooltip to show */
}

.item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(210, 155, 97, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.item:hover::before {
  opacity: 1;
}

.item:hover {
  transform: translateY(-5px);
  border-color: rgba(210, 155, 97, 0.4);
  box-shadow: 0 10px 25px rgba(210, 155, 97, 0.2);
}

.item:hover .iteminfo {
  display: block !important;
  opacity: 1;
  visibility: visible;
}

.iteminfo {
  display: none;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2a2520 0%, #1a1a1a 100%);
  border: 2px solid rgba(210, 155, 97, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  min-width: 280px;
  max-width: 320px; /* Added max-width to prevent tooltip from being too wide */
  z-index: 1000; /* Increased z-index to ensure tooltip appears above all other elements */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(210, 155, 97, 0.2);
  margin-top: 10px;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text to wrap inside tooltip */
  word-wrap: break-word; /* Break long words if needed */
}

.iteminfo::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #d29b61;
}

.iteminfo .quality {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: relative; /* Added position relative so image can be absolute inside it */
}

/* Making image position absolute to overlay on quality background in tooltip */
.iteminfo .image {
  width: 50px;
  height: 50px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.iteminfo p {
  font-size: 0.9rem;
  color: #e4d5b8;
  line-height: 1.8;
}

.name {
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #e4d5b8;
  margin-bottom: 1rem;
  text-align: center;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item .quality {
  width: 70px;
  height: 70px;
  margin: 0 auto 0.75rem;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: relative; /* Added position relative so image can be absolute inside it */
}

/* Making image position absolute to overlay on quality background */
.item .image {
  width: 64px;
  height: 64px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none; /* Prevent image from blocking hover events */
}

/* Added Plus badge styling */
.corner-item {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #d29b61 0%, #b8864f 100%);
  color: #1a1a1a;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(210, 155, 97, 0.5);
  pointer-events: auto;
  z-index: 10;
  font-family: "Roboto", sans-serif;
  letter-spacing: 0.5px;
}

.prize {
  display: inline-block; /* Changed from flex to inline-block for simpler layout */
  width: 100%; /* Full width for centering */
  text-align: center; /* Center the text */
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(210, 155, 97, 0.2);
  font-size: 1.1rem; /* Slightly reduced font size */
  font-weight: 700;
  color: #d29b61;
  font-family: "Roboto", sans-serif;
  white-space: nowrap; /* Prevent line break between number and currency */
}

@media (max-width: 1024px) {
  .items {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .content {
    padding: 1rem;
  }

  .mytitle {
    font-size: 2rem;
  }

  .info {
    flex-direction: column;
    text-align: center;
  }

  .shop-num {
    position: static;
    transform: none;
    margin-top: 1rem;
  }

  .items {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .message form {
    flex-direction: column;
  }

  .message input[type="submit"] {
    width: 100%;
  }
}
