/* Upgrade Overlay Styles */
#upgrade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
    display: none; /* Initially hidden */
  }
  
.shop-container {
    background-color: rgba(70, 70, 70, 0.95);
    color: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    /* width: 90%; */
  }

  .shop-current-items {
    display: flex;
    justify-content: space-around;
    width: 100%;
  }

  #shop-current-upgrades {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
  }

  #shop-close-btn {
    width: 50%;
    height: 7vh;
    margin: auto;
    align-self: center;
  }
  
  .upgrade-card {
    background-color: #555;
    border-radius: 12px;
    padding: 20px;
    width: 220px;
    flex-grow: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    height: 360px; /* Increased height to accommodate both sections */
  }

  .upgrade-section {
    margin-bottom: 10px;
    width: 100%;
  }

  .card-divider {
    width: 90%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 5px 0 10px 0;
  }

  .debuff-section {
    width: 100%;
    padding-top: 5px;
  }

  .debuff-title {
    color: #ff6b6b; /* Red color for debuffs */
  }

  .shop-abilities-header {
    text-align: center;
    margin-bottom: 10px;
    color: white;
    font-weight: bold;
  }

  .ability-card {
    background-color: #848484;
    border-radius: 12px;
    padding: 20px;
    width: 200px;
    height: 200px;
    flex-grow: 0;
    flex-shrink: 0;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
  }

  .ability-card::before {
    font-size: 2.5em;
    margin-bottom: 10px;
    margin-top: 10px;
  }

  .ability-card[data-ability="hint"]::before {
    content: "💡";
  }

  .ability-card[data-ability="darken"]::before {
    content: "🌙";
  }

  .ability-card[data-ability="accept-non-words"]::before {
    content: "🔓";
  }

  .ability-card[data-ability="repeats"]::before {
    content: "🔄";
  }

  #shop-current-abilities {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
    justify-items: center;
    align-items: center;
    /* width: 70%; */
    margin: auto;
  }

  .ability-card.disabled {
    background-color: #555;
  }

  .ability-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }
  .ability-card.disabled:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }

  .ability-card p {
    font-size: 14px;
    line-height: 1.4;
    margin-top: 10px;
    margin-bottom: 10px;
  }
  .upgrade-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }
  
  .upgrade-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: bold;
  }
  
  .upgrade-card p {
    font-size: 14px;
    line-height: 1.4;
  }
  
  /* Tier-specific styling */
  .shop-upgrade-tier1 {
    border: 4px solid #4040FF;
    background: linear-gradient(to bottom, #4040ffc4, #444);
  }
  
  .shop-upgrade-tier2 {
    border: 4px solid #40C040;
    background: linear-gradient(to bottom, #40d75270, #444);
  }
  
  .shop-upgrade-tier3 {
    border: 4px solid #FFA500;
    background: linear-gradient(to bottom, #ffa50082, #444);
  }

  /* Debuff styling in the active upgrades area */
  .cur-debuff-tier1 {
    border: 4px solid #FF4040;
    background: linear-gradient(to bottom, #ff4040a8, #FF4040);
  }

  .cur-debuff-tier2 {
    border: 4px solid #FF4040;
    background: linear-gradient(to bottom, #ff4040a8, #FF4040);
  }

  .cur-debuff-tier3 {
    border: 4px solid #FF4040;
    background: linear-gradient(to bottom, #ff4040a8, #FF4040);
  }

  .purchased {
    background: linear-gradient(to bottom, #555, #444) !important;
    border: 4px solid #555 !important;
  }
    /* Add this to your existing CSS */
  .upgrade-card.purchased {
    cursor: default;
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }

  .upgrade-card.purchased:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .shop-container {
      padding: 20px;
    }
    
    .upgrade-card {
      width: 180px;
      padding: 15px;
    }
    
    /* Force single column layout for upgrade cards */
    .shop-current-items {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 15px;
    }
    
    #shop-current-upgrades {
      flex-direction: column;
      flex-wrap: nowrap;
      align-items: center;
    }
  }