/* ========== Shop Styles ========== */
#SPS_app_shop {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Background - extended and centered by height */
.SPS_background {
  position: absolute;
  pointer-events: none;
  height: 100%;
  z-index: 0;
}
.SPS_background img {
  position: absolute;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}


/* Main container for positioned elements (1920x1080 reference) */
.SPS_mainCont {
  position: absolute;
  height: 1080px;
  width: 1920px;
  z-index: 1;
}


/* ========== ITEMS ========== */
.SPS_items_mainCont {
  position: absolute;
  pointer-events: none;
  height: 100%;
  width: 100%;
}

.SPS_item_cont {
  position: absolute;
  pointer-events: none;
  cursor: default;
}
.SPS_item_cont img {
  pointer-events: none;
  width: 100%;
  transition: filter 0.15s ease, transform 0.15s ease;
}

/* .SPS_item_cont.hovered img {
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
  transform: scale(1.02);
} */

.SPS_item_clickArea {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  pointer-events: auto;
  cursor: pointer;
  /* Clip values are set inline via style */
  transition: opacity 0.2s;

  /* Debug: uncomment to see click areas */
  /* background-color: rgba(0, 255, 255, 0.288); */
}

.SPS_item_clickArea:hover {
  background-image: radial-gradient(rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

/* Out-of-stock (not in today's daily rotation) */
.SPS_item_cont.outOfStock img {
  filter: grayscale(1) opacity(0.25);
  transition: filter 0.15s ease;
}
.SPS_item_cont.outOfStock .SPS_item_clickArea {
  cursor: default;
  pointer-events: auto;
}


/* ========== INFO PANEL ========== */
.SPS_infoPanel_cont {
  position: absolute;
  left: 1608px;
  top: 379px;
  width: 173px;
  height: 129px;
  padding: 7px;

  /* background: linear-gradient(135deg, var(--A2-secondary) 0%, rgba(20, 20, 30, 0.95) 100%);
  border: 3px solid var(--A1-primary);
  border-radius: 15px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1); */

  z-index: 100;

  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;

  transform: translateY(-10px);
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.SPS_infoPanel_cont:not(.displayNone) {
  opacity: 1;
  transform: translateY(0);
}

.SPS_infoPanel_name {
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
  color: black;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.SPS_infoPanel_price {
  position: absolute;
  bottom: 8px;
  padding: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: bold;
  color: #ffd700;
  text-align: center;
}

.SPS_infoPanel_price img {
  width: 32px;
  height: 32px;
}

.SPS_infoPanel_price span {
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: black;
  text-stroke: 1px black;
}

.SPS_infoPanel_price.SPS_infoPanel_price_noCoin {
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  font-size: 19px;
  top: 64px;
}


/* ========== ITEM GROUP SELECTOR ========== */
.SPS_itemGroup_cont {
  position: absolute;
  left: 1140px;
  transform: translateX(-50%);
  top: 390px;
  height: 160px;

  background: rgba(0, 0, 0, 0.575);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);

  z-index: 150;
  pointer-events: auto;

  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.SPS_itemGroup_cont:not(.displayNone) {
  opacity: 1;
}

.SPS_itemGroup_items {
  display: flex;
  height: 100%;
  gap: 5px;
}

.SPS_itemGroup_item {
  height: 100%;
  aspect-ratio: 1 / 1;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;

  transition: background 0.15s ease;
}

.SPS_itemGroup_item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.SPS_itemGroup_item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* ========== SHOPPING LIST ========== */
.SPS_shoppingList_cont {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 600px;
  height: 330px;

  background: linear-gradient(180deg, rgba(20, 20, 30, 0.95) 0%, rgba(10, 10, 15, 0.98) 100%);
  border: 3px solid var(--A1-primary);
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 20px;

  z-index: 50;
  overflow: hidden;

  display: flex;
  flex-direction: column;
}

.SPS_shoppingList_header {
  padding: 15px 20px;
  background: black;
  color: var(--A5-text);
  font-size: 1.2em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.SPS_shoppingList_total {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffd700;
  font-size: 1.3em;
}

.SPS_shoppingList_total img {
  width: 24px;
  height: 24px;
}

.SPS_shoppingList_total span {
  /* -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: black;
  text-stroke: 1px black; */
}

.SPS_shoppingList_items {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.SPS_shoppingList_items::-webkit-scrollbar {
  width: 8px;
}

.SPS_shoppingList_items::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.SPS_shoppingList_items::-webkit-scrollbar-thumb {
  background: var(--A1-primary);
  border-radius: 4px;
}

.SPS_shoppingList_item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  margin-bottom: 8px;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;

  transition: background 0.15s ease;
}

.SPS_shoppingList_item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.SPS_shoppingList_item_info {
  display: flex;
  flex-direction: row;
  gap: 2px;
  width: 300px;
  justify-content: space-between;
}

.SPS_shoppingList_item_name {
  font-size: 1em;
  color: var(--A5-text);
}

.SPS_shoppingList_item_price {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 4px;
}

.SPS_shoppingList_item_price img {
  width: 14px;
  height: 14px;
}

.SPS_shoppingList_item_right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.SPS_shoppingList_item_qty_control {
  display: flex;
  align-items: center;
  gap: 3px;
}

.SPS_shoppingList_item_qty_btn {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: var(--A5-text);
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s ease;
  padding: 0;
  line-height: 1;
}

.SPS_shoppingList_item_qty_btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.SPS_shoppingList_item_qty_btn:active {
  background: rgba(255, 255, 255, 0.35);
}

.SPS_qty_input_wrapper {
  display: flex;
  align-items: center;
  height: 24px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0 4px 0 5px;
  gap: 1px;
  transition: border-color 0.1s ease;
}

.SPS_qty_input_wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.5);
}

.SPS_qty_x_prefix {
  font-size: 1em;
  font-weight: bold;
  color: var(--A5-text);
  user-select: none;
  pointer-events: none;
}

.SPS_shoppingList_item_qty_input {
  width: 36px;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--A5-text);
  font-size: 1em;
  font-weight: bold;
  text-align: center;
  padding: 0;
  outline: none;
  -moz-appearance: textfield;
}

.SPS_shoppingList_item_qty_input::-webkit-inner-spin-button,
.SPS_shoppingList_item_qty_input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@keyframes SPS_qty_flash_red {
  0%   { color: var(--A5-text); }
  25%  { color: #e74c3c; }
  75%  { color: #e74c3c; }
  100% { color: var(--A5-text); }
}

.SPS_qty_flash {
  animation: SPS_qty_flash_red 0.4s ease;
}

.SPS_shoppingList_item_delete {
  height: 1.5em;
  aspect-ratio: 1 / 1;
  background: rgba(231, 76, 60, 0.3);
  border-radius: 50%;
  color: #e74c3c;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;

  display: flex;
  align-items: center;
  justify-content: center;
}

.SPS_shoppingList_item_delete:hover {
  background: #e74c3c;
  color: white;
  transform: scale(1.1);
}

.SPS_shoppingList_empty {
  padding: 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  font-size: 1.1em;
}

.SPS_shoppingList_items:not(:empty) + .SPS_shoppingList_empty {
  display: none;
}


/* ========== BUY BUTTON ========== */
.SPS_buyBtn {
  position: absolute;
  right: 30px;
  bottom: 30px;
  width: 200px;
  height: 70px;

  background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%);
  border: 4px solid #27ae60;
  border-radius: 15px;

  font-size: 1.8em;
  font-weight: bold;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.1em;

  cursor: pointer;
  z-index: 50;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  box-shadow:
    0 6px 20px rgba(46, 204, 113, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);

  transition: all 0.15s ease;
}

.SPS_buyBtn img {
  width: 32px;
  height: 32px;
}

.SPS_buyBtn:not(:disabled):hover {
  transform: translateY(-3px);
  box-shadow:
    0 10px 30px rgba(46, 204, 113, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.SPS_buyBtn:not(:disabled):active {
  transform: translateY(0);
}

.SPS_buyBtn:disabled {
  background: linear-gradient(180deg, #555 0%, #444 100%);
  border-color: #444;
  color: #888;
  cursor: default;
  box-shadow: none;
}


/* ========== MONEY DISPLAY ========== */
.SPS_moneyDisplay {
  position: absolute;
  top: 100px;
  /* bottom: 313px; */
  right: 0;
  padding: 12px 25px;

  background: linear-gradient(180deg, rgba(20, 20, 30, 0.95) 0%, rgba(10, 10, 15, 0.98) 100%);
  border: 3px solid var(--A1-primary);
  border-right: 0px;
  border-radius: 15px 0 0 15px;
  transform: translateX(5px);


  font-size: 1.6em;
  font-weight: bold;
  color: #ffd700;

  /* -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: black;
  text-stroke: 1px black; */

  display: flex;
  align-items: center;
  gap: 12px;

  z-index: 50;
}

.SPS_moneyDisplay img {
  width: 28px;
  height: 28px;
}

/* ========== INFINITY MODE BUTTON ========== */
.SPS_infinityBtn {
  background: none;
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  min-width: 34px;
  font-size: 1.15em;
  color: rgba(255, 215, 0, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease, border-color 0.2s ease,
              background 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}
.SPS_infinityBtn:hover {
  color: #ffd700;
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.12);
}
.SPS_infinityBtn.active {
  color: #ffd700;
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.25);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.55);
}

/* ========== APHRODISIAC SHOP POPUP ========== */
.SPS_aphrodisiacShop_overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 180;
  pointer-events: all;
}

.SPS_aphrodisiacShop_overlay.displayNone {
  pointer-events: none;
  display: none;
}

.SPS_aphrodisiacShop_popup {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;

  background: #0b0b0b;
  border: 3px solid #ffffff;
  border-radius: 20px;
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);

  z-index: 200;
  pointer-events: auto;

  display: flex;
  flex-direction: column;

  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.SPS_aphrodisiacShop_popup:not(.displayNone) {
  opacity: 1;
}

.SPS_aphrodisiacShop_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.SPS_aphrodisiacShop_header h2 {
  margin: 0;
  font-size: 2em;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.SPS_aphrodisiacShop_closeBtn {
  background: #111111;
  border: 2px solid #ffffff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5em;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.SPS_aphrodisiacShop_closeBtn:hover {
  background: #ffffff;
  color: #000000;
  transform: scale(1.1);
}

.SPS_aphrodisiacShop_content {
  flex: 1;
  padding: 25px;
  overflow-y: auto;
  color: #ffffff;
  font-size: 1.1em;
}

.SPS_aphrodisiacShop_empty {
  display: none;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-top: 40px;
}

.SPS_aphrodisiacShop_list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.SPS_aphrodisiacShop_item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.SPS_aphrodisiacShop_item[data-rarity="common"] {
  border-color: #808080;
}

.SPS_aphrodisiacShop_item[data-rarity="uncommon"] {
  border-color: #00ff00;
}

.SPS_aphrodisiacShop_item[data-rarity="rare"] {
  border-color: #0080ff;
}

.SPS_aphrodisiacShop_item[data-rarity="veryRare"],
.SPS_aphrodisiacShop_item[data-rarity="varyRare"] {
  border-color: #ff69b4;
}

.SPS_aphrodisiacShop_item[data-rarity="ultraRare"] {
  border-color: #ff3b30;
}

.SPS_aphrodisiacShop_item[data-rarity="legendary"] {
  border-color: #ffd700;
}

.SPS_aphrodisiacShop_item_left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.SPS_aphrodisiacShop_item_name {
  font-size: 1.1em;
  font-weight: bold;
  color: #ffffff;
}

.SPS_aphrodisiacShop_item_rarity {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.08em;
}

.SPS_aphrodisiacShop_item[data-rarity="veryRare"] .SPS_aphrodisiacShop_item_rarity,
.SPS_aphrodisiacShop_item[data-rarity="varyRare"] .SPS_aphrodisiacShop_item_rarity {
  color: #ff69b4;
}

.SPS_aphrodisiacShop_item[data-rarity="ultraRare"] .SPS_aphrodisiacShop_item_rarity {
  color: #ff3b30;
}

.SPS_aphrodisiacShop_item[data-rarity="legendary"] .SPS_aphrodisiacShop_item_rarity {
  color: #ffd700;
}

.SPS_aphrodisiacShop_item_price {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  color: #ffffff;
  flex-shrink: 0;
  min-width: 60px;
  justify-content: flex-end;
  margin-right: 30px;
}

.SPS_aphrodisiacShop_item_price img {
  width: 18px;
  height: 18px;
}

.SPS_aphrodisiacShop_addBtn {
  background: #ffffff;
  color: #000000;
  border: 2px solid #ffffff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
}

.SPS_aphrodisiacShop_addBtn:hover {
  background: #000000;
  color: #ffffff;
}

.SPS_aphrodisiac_icon {
  position: absolute;
  pointer-events: auto;
  z-index: 10;
}

.SPS_aphrodisiac_iconNotice {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #000000;
    font-size: 4.4rem;
    /* font-weight: 900; */
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
    transform: translateY(6px) scale(1);
    transition: transform 0.2s ease;
}
