.dungeon-summary-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 5, 8, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(8px);
}

.summary-card {
  width: 490px;
  background: #0a0f18;
  border: 1px solid #00d4ff;
  padding: 40px;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.15);
}

.summary-title {
  color: #00d4ff;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 4px;
  margin-bottom: 5px;
  font-size: 1.5rem;
}

.summary-line {
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, transparent);
  margin-bottom: 30px;
}

.reward-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.stat-box {
  background: rgba(26, 38, 56, 0.3);
  padding: 15px;
  border-left: 3px solid #00d4ff;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 10px;
  color: #4a5d75;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: bold;
}

.loot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 15px;
  margin-top: 15px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}

.loot-item-slot {
  width: 70px;
  height: 70px;
  background: #05080c;
  border: 1px solid #1a2638;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.loot-img-container img {
  max-width: 80%;
  max-height: 80%;
}

.loot-qty {
  position: absolute;
  bottom: 2px;
  right: 5px;
  font-size: 11px;
  color: #00d4ff;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
}

.summary-btn {
  margin-top: 40px;
  width: 100%;
  padding: 15px;
  background: transparent;
  border: 1px solid #00d4ff;
  color: #00d4ff;
  font-family: "Orbitron", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.summary-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  box-shadow: inset 0 0 15px rgba(0, 212, 255, 0.3);
}

@media screen and (max-width: 768px) {
  .dungeon-summary-overlay {
    padding: 15px;
  }

  .summary-card {
    width: 100%;
    max-width: 400px;
    padding: 25px 20px;
    box-sizing: border-box;
  }

  .summary-title {
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-align: center;
  }

  .summary-line {
    margin-bottom: 20px;
  }

  .reward-stats {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }

  .stat-box {
    padding: 10px;
  }

  .stat-value {
    font-size: 1rem;
  }

  .loot-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    max-height: 200px;
  }

  .loot-item-slot {
    width: 60px;
    height: 60px;
  }

  .summary-btn {
    margin-top: 25px;
    padding: 12px;
    font-size: 0.8rem;
    letter-spacing: 1px;
  }
}

@media screen and (max-width: 380px) {
  .summary-card {
    padding: 20px 15px;
  }

  .loot-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .loot-item-slot {
    width: 55px;
    height: 55px;
  }
}
