.main-content {
  display: flex;
  gap: 24px;  /* Creates margin between columns */
  flex: 1;
  background: #f5f5f5;
  border-radius: 8px;
  margin-top: 2em;
  padding: 1em;
  border: 1px solid #eee;
}

.left-column {
  flex: 2;  /* Takes up 2/3 of the space */
  display: flex;
  flex-direction: column;
  min-height: 500px;  /* Just for demonstration */
  gap: 24px;
}

.right-column {
  flex: 1;  /* Takes up 1/3 of the space */
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Add responsiveness for mobile devices */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }
}

.resource-pack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.resource-pack-item {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  overflow: visible;
  cursor: pointer; /* Add cursor pointer for better UX */
}

/* Add backdrop positioning */
.resource-pack-item .backdrop {
  position: absolute;
  border-radius: 8px;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  background-color: #a4cad8;
}

/* Update backdrop opacity for selected state */
.resource-pack-item.selected .backdrop, .resource-pack-complex-item.selected .backdrop {
  opacity: 0.30 !important;
}

.resource-pack-item:hover .backdrop, .resource-pack-complex-item:hover .backdrop {
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

/* Content image styling */
.content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.4));
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
  color: #c1dce1;
  font-size: 12px;
}
.resource-pack-item .content {
  width: 80%;
  height: 80%;

}

.resource-pack-complex-item .content {
  width: 70%;
  height: 70%;
}

.resource-pack-complex-item .backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
}


/* Update texture-preview styling */
.texture-preview {
  position: fixed;
  background: rgb(100, 100, 100, 0.85);
  border: 1px solid rgb(128, 128, 128);
  padding: 8px;
  border-radius: 4px;
  z-index: 100;
  gap: 8px;
  display: grid;
  grid-gap: 8px;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.texture-preview img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.25));
}

/* Update hover behavior */
.resource-pack-item:hover .texture-preview {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.3s; /* 1 second delay before showing */
}

/* Add exit behavior */
.resource-pack-item:not(:hover) .texture-preview {
  opacity: 0;
  visibility: hidden;
}

/* Common button styles */
.base-button, .download-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    border: 1px solid #4c96b3;
    border-radius: 4px;
    color: #4c96b3;
    background-color: #e7f3f7;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.base-button:hover, .download-button:hover {
    background-color: #d3e7eb;
    color: #4d92a3;
}

.base-button:active, .download-button:active {
    background-color: #c1dce1;
    color: #4d92a3;
}

/* Download button initial and disabled states */
.download-button[disabled],
.download-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
    border-color: #ccc;
    pointer-events: none;
    color: #999;
}

/* This additional selector is needed for some browsers */
.download-button[disabled] {
    pointer-events: none !important;
}

/* top buttons container */
.top-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.button-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: inherit;
  font-weight: 500;
}

.selected-packs-list {
  flex: 1; /* Take up remaining space */
  width: 100%;
  box-sizing: border-box;
  background: white;
  padding: 0.5em;
  border-radius: 8px;
  border: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  overflow-y: auto; /* Allow scrolling if content overflows */
}

.selected-pack-item {
  display: flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.2em;
  background: #f5f8fa;
  border: 1px solid #e0e6eb;
  border-radius: 8px;
}

.selected-pack-item img {
  width: 24px;
  height: 24px;
  padding-left: 0.35em;
  filter: drop-shadow(0 0 1px rgba(32, 32, 32, 0.50));
  image-rendering: pixelated;
}

.selected-pack-item span {
  font-size: 12px;
  color: #4a4a4a;
}

.resource-pack-complex-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: visible;
    cursor: pointer;
    display: grid;
    grid-template-columns: 7fr 1fr;
    gap: 2px;
    padding: 0;
    aspect-ratio: 1/1;
    border-radius: 8px;
}

.complex-left-column {
    position: relative;
}
.complex-left-column .backdrop {
  border-radius: 8px 0 0 8px;
  background-color: #a4cad8;
}

.complex-right-column {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
}

.complex-right-top,
.complex-right-bottom {
    background-color: #e7f3f7;
    border: 1px solid #4c96b3;
    padding: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.complex-right-top {
    border-radius: 0 8px 0 0;
}

.complex-right-bottom {
    border-radius: 0 0 8px 0;
}

.complex-right-top:hover,
.complex-right-bottom:hover {
    background-color: #d3e7eb;
}

.complex-right-top:active,
.complex-right-bottom:active {
    background-color: #c1dce1;
}

.arrow {
    font-family: monospace;
    font-size: 14px;
    font-weight: 600;
    color: #4c96b3;
    transform: scaleX(1.5);
    display: inline-block;
}

.complex-right-bottom .arrow {
    transform: scaleX(1.5) rotate(180deg); /* Rotate to create down arrow */
}

/* Optional: Style arrow on hover */
.complex-right-top:hover .arrow,
.complex-right-bottom:hover .arrow {
    color: #4d92a3;
}